2

I am opening builtin image provider in android and its opening correctly.

Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);

    // Filter to only show results that can be "opened", such as a
    // file (as opposed to a list of contacts or timezones)
    intent.addCategory(Intent.CATEGORY_OPENABLE);

    // Filter to show only images, using the image MIME data type.
    // If one wanted to search for ogg vorbis files, the type would be "audio/ogg".
    // To search for all documents available via installed storage providers,
    // it would be "*/*".
    intent.setType("image/*");

    startActivityForResult(intent, READ_REQUEST_CODE);

I want icon

Now my question is I want to open it with my custom theme.

Such as applying my android:colorPrimary and also I want an alwasy visible Camara icon in menu...

How can I apply my app theme to document provider ?

Azim Ansari
  • 1,378
  • 11
  • 20
  • Can you able explain what is the exact problem you are facing with – Sree Jul 07 '15 at 06:22
  • I am not facing any problem but I I want to know how to customize theme of Image provider – Azim Ansari Jul 07 '15 at 06:30
  • you want to customize your action bar right ? – Sree Jul 07 '15 at 06:32
  • Not my action bar but android Image provider's action bar – Azim Ansari Jul 07 '15 at 06:33
  • look at the image now I want that camara icon to open camara and also want to apply my apps primary color to android image picker – Azim Ansari Jul 07 '15 at 06:37
  • https://developer.android.com/training/basics/actionbar/styling.html check this, – Sree Jul 07 '15 at 06:44
  • 1
    *How can I apply my app theme to document provider ?* - you're not trying to change the appearance of the document provider, you're trying to change the appearance of a system app which is the middle man between the document providers and your app which is requesting a document. This will not work. – user Jul 07 '15 at 06:46
  • You got my problem correctly. how can I do that – Azim Ansari Jul 07 '15 at 06:48
  • Just for the record, I tried updating my `styles.xml` to see if I could affect the `ACTION_OPEN_DOCUMENT` Intent styling when selecting a file but nothing was able to affect it, which makes sense according to what is happening (i.e. it's a completely different application that's native to the OS - our app is just calling it as a Document Provider). The only real solution was to create our own Document Provider via https://developer.android.com/guide/topics/providers/create-document-provider but we've saved that for another day. If anybody has any luck with this, please post. – Joshua Pinter Jul 21 '20 at 14:37

0 Answers0