Issue
I have made an app that has got a lot of graphics for a miriad of different buttons. All the graphic for each and every button is replicated scaled in drawable-xhdpi
, drawable-hdpi
, drawable-mdpi
and drawable-ldpi
.
The amount of graphics in the first two directories is around 3.5MB, while the app in its all is about 7.5MB.
Obviously it would crazy to ask people that own low-end smartphones to download and fill their memory with 3.5MB of graphics that are completely useless, so I decided to make one "lite
" version for such people.
I want to have a constant, something like
static final boolean LITE_BUILD = true;
So that when I set it to true, the build automatically excludes xhdpi
and hdpi
graphics.
Right now the only solution I have is to manually move away those two directories, build the lite version, put the directories back and build the complete version. obviously it's not optimal.
Solution
Well, Since all the drawables you put in these folders are constant, I think building the same app twice, while in the lite version it has only the low dpi images, will be the only solution.
if you are worried about people downloading the right app(full or lite) for their phone, you can flag in the app manfiest what phone screen sizes it supports.
so low dpi phones will only see the lite version while other phones will see the full version ( I think it works this way ).
Answered By - Daniel Mendel
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.