0

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

5
  • whats the present size of app? Commented Nov 7, 2013 at 7: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 Commented Nov 7, 2013 at 7:27
  • are you using any video files or images files.. Commented Nov 7, 2013 at 7:29
  • i used images an text only for the xml pages Commented Nov 7, 2013 at 7:35
  • [Hope this help you.][1] check this question [1]: stackoverflow.com/questions/3815269/how-to-reduce-app-apk-size Commented Nov 7, 2013 at 7:39

2 Answers 2

1

you can define all view at runtime..

so it will consume memory.

Sign up to request clarification or add additional context in comments.

3 Comments

how can i do this?? please explain I am in just learning stage of android
go this links this
go this links this [this](stackoverflow.com/questions/2693744/…) [this](stackoverflow.com/questions/6583019/…) [this](stackoverflow.com/questions/15261811/…) [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)
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.

2 Comments

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
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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.