ldpi icons not showing android -


i have app has buttons background images specify in layout. mdpi , works fine , can see images. started tested on small device , saw backgrounds show black. checked screen size (small) cater , checked density, saw in case ldpi. rescaled mdpi images 36x36 , created mipmap-ldpi folder. android studio sees in design time reason not picked @ runtime. googled around , saw might have add them manually via android studio. created new resource directory specified density ldpi below :

add new resource directory

i each icon added new file same name , selected ldpi folder below :

and select ldpi directory :

select mipmap ldpi directory

i entered same name other densities each icon / image.

after still black background thought let me try , assign background programmatically. works. can me why not work when specifying in layout file. have layout file small screens. must specify density ?

apologies images. see cannot embed yet because reputation low.

update 1 :

moved icons drawables recommended , still doing it. read other articles ldpi not supported anymore , answered question make problem go away not supporting devices ldpi density. next day picked same problem on old s2 hpdi density. possibly not ldpi problem anymore until proven otherwise. find problem , fixed.

the mipmap directories used store launcher icons. not used inside app, @ home screen , app listing.

the reason is, when resource drawable-directory requested, bitmap chosen folder that matches current density. but, when use mipmap drawable, launcher may choose icon different folder (usually size-up). that's why you're not seeing ldpi icon.

some launchers display icons larger intended. therefore, using mipmap launchers helps in this.

also check this link out.

summary: use drawables icons used inside app , mipmap launcher icon of app.


Comments

Popular posts from this blog

sql - invalid in the select list because it is not contained in either an aggregate function -

Angularjs unit testing - ng-disabled not working when adding text to textarea -

How to start daemon on android by adb -