I am working with android app.Since I am new to android development, I completed my recipe app using diff XML file. I used each XML page for each item and it can be selected using the list activity. But it seems to be large memory size . How can I reduce this memory ?? Or is there any other method without using diff XML for each one ??? please help me and thanks
Asked
Active
Viewed 297 times
0
-
whats the present size of app? – Harish Koona Nov 07 '13 at 07:24
-
above 20 mb for the generated apk file :( how can i reduce this ?? is it any way to reduce the number of xml file ?? ie, can content to store to a single one ?? is it posible ??? if yes , kindly explain please – Nov 07 '13 at 07:27
-
are you using any video files or images files.. – Harish Koona Nov 07 '13 at 07:29
-
i used images an text only for the xml pages – Nov 07 '13 at 07:35
-
[Hope this help you.][1] check this question [1]: http://stackoverflow.com/questions/3815269/how-to-reduce-app-apk-size – Harish Koona Nov 07 '13 at 07:39
2 Answers
1
you can define all view at runtime..
so it will consume memory.

AndyBoy
- 564
- 6
- 29
-
-
go this links [this](http://stackoverflow.com/questions/5763366/how-to-create-multiple-buttons-at-runtime-android) – AndyBoy Nov 07 '13 at 08:03
-
go this links [this](http://stackoverflow.com/questions/5763366/how-to-create-multiple-buttons-at-runtime-android) `[this]`(http://stackoverflow.com/questions/2693744/android-runtime-layout-tutorial) `[this]`(http://stackoverflow.com/questions/6583019/dynamic-textview-in-relative-layout) `[this]`(http://stackoverflow.com/questions/15261811/dynamically-adding-linearlayouts-in-android) `[this]`(stackoverflow.com/questions/7354034/dynamically-add-a-textview-android) `[This]`(stackoverflow.com/questions/9509842/how-to-add-a-dynamically-created-linearlayout-to-a-scrollview) – AndyBoy Nov 07 '13 at 08:09
0
you can make all the views at the run time. and if some activities has same layouts you can use one layout for all that activities.
Try to generate all the layouts values dynamically. It will reduce size as well as helps to maintain the app for future updates.

Mohit Rakhra
- 114
- 1
- 15
-
I am trying to load images from drawable to the same imageview for diff actions .is it posiible ?? show me an example if you dont mind thank you – Nov 07 '13 at 08:00
-
You please put some code as an sample of what you are actually doing. If will be a good way to help you out in this – Mohit Rakhra Nov 07 '13 at 08:29