How to change the appearance of the file header on Android?

I want to show a file collector to open an image with this code:

Intent intent = new Intent();

intent.setType("image/*");
intent.setAction(Intent.ACTION_GET_CONTENT);

startActivityForResult(Intent.createChooser(intent, "choose from"), PICK_FROM_FILE);

How to change the font and gravity of the file header ("choose from")?

+4
source share
2 answers

This is what I found while delving into the Android source code:

createChoosercreates intention with ACTION_CHOOSERaction. When you launch your intention, it is created ChooserActivity(not sure how), which expands ResolverActivity. Layout applied to ResolverActivity, resolver_listor resolver_list_with_default. There you can find title.

Thus, no, it seems not possible to change the appearance of the file header. But you can create your own file selection based on the source code.

+3

, // , / , , , , ( ).

+1

All Articles