Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

create folder with app icon instead of default folder icon

Tags:

java

android

I want to add my app Icon to created folder instead of default folder icon.

I know i can create folder with following code.

String extr = Environment.getExternalStorageDirectory().toString();
File mFolder = new File(extr + "/My Application/Downloads");
if (!mFolder.exists()) {
    mFolder.mkdirs();
}

By doing this, i'm getting following result.

enter image description here

but what i want is..

enter image description here

I have searched a lot, but no luck. can anyone help me out?

Thank you.

like image 768
V-rund Puro-hit Avatar asked Dec 15 '16 13:12

V-rund Puro-hit


1 Answers

Directories do not have icons, and so whatever app or tool your screenshot is from is adding that. You would have to ask the developers of that app or tool what algorithm they are using to determine the icon to show.

like image 198
CommonsWare Avatar answered Sep 22 '22 09:09

CommonsWare