Confusion on multiple design resource files in Android - android

I'm trying to accomplish whats written HERE on supporting multiple screen sizes, I understood that every design in the app should be in 3 sizes.
1. The designer asked the 3 sizes he should design for, he already created designs in 1 size which is 480x800.. What are the other 2?
2. My .apk file is 5 mb big with only the designs of 1 size (480x800).. So when I add the 2 other the .apk will become huge.. How do I avoid this?

Obviously you need to compress the files to a suitable size and implement the look and feel in code/xml.
Besides that if you still run out of room you could create multiple application for different devices with a whole bunch of disadvantages in terms of market presence.

Related

android Memory ,vector images

I have been making a project in android and it has almost 10 classes as activities or fragments . the sizeof the apk is ~5mb , how can I reduce that . Also , I considered using android provided icons instead of png images but it looks like I would save at most 100 Kb. I don't think that would make much of a difference or would it ?

Multiple apk approach for a game

I'm planning to use the Multiple apk approach to my current project, since it has a big number of drawables for every density and the apk file is big right now. Are there any pitfalls in using this kind of approach? By the way, does the download statistics "sum up" on the Android Market for Multiple apk's? Thanks in advance.
As our comment discussion
In my experience apk size does not affect performance of application.As if you are using hdpi
device then ldpi resource will not load.So device will load only the resource required by
current device.And i think this is best approach.
Second If you want to make three application instead of one for ldpi,hdpi,and mdpi then its very time consuming.and it cannot sum the download of all three application.Android gave three option of ldpi,hdpi,mdpi.So we have to use it.
Hope you got my point

Is it possible to divide an Android application into two APK files?

I have android application (single apk file) with code and ga lot of graphics, It takes a lot of space. I want to devide my huge application into two parts. The first is a source code and minor graphice (takes low space), the second part includes all other graphic. When user launches first application, it uses graphic from another application.
1) Is solution it possible?
2) If it is possible, how can I access from first apk to a resource file at SD card, whick stores in another zip/archive/jar/or apk?
Maybe you can provide your graphic as a Content Provider in one application and then read them in another application.
You can use Library Projects to achieve this.
There are a number of ways to do this. One of the more popular is to require the application to download the large graphics on "first-run". This is done by most large game apps.

how to use different package for different device in android?

Hi i have develop a application in android which run in every device, i use different layout for different size device's but i have use some code programmatically without xml so, it create a problem in different size device.
so i require to change the package acording to the device resolution so, it can posible in android to programmatically detect and change the package class
plz, give some suggestion.
Thanking you.
i have use android2.2 for my application
No, it is not possible to programmatically change the application package. For device-specific display sizes you can create size-specific layouts as described in the guide and use getResources().getConfiguration() to programmatically choose specific code paths to execute.
"i use different layout for different size device's " means you just use dp/dip sizes or that you have completely different layouts for each screen size?
If you only used dp/dip units, then you can add a scalefactor to your code to get the matching coordinates. If you are using different layouts, it's much more difficult. Depending on how many different layout configurations you have, you could build seperate apk files and upload them parallel. The Market will handle the distribution of the matching files then.
Another way:
Create an installer app which checks the device configuration and downloads the device-specific package afterwards from a ftp/network resource.
After installation, delete the installer and the .apk file.

Convert PSD to Android XML (layout) Format?

I am coding an Android App for a research project at my institution, and have been working with a designer who has rendered some attractive UI mockups in Photoshop (using CS5). I'd like to implement her designs as layouts for my Android application, and this would be WORLDS simpler if there were some way I could convert the files to XML format. I think it's rather counter-intuitive that PS offers android templates, but no real way to apply these in the android design/layout process, short of (attempting to) mimic her artwork in XML code, which I cannot do by any stretch. Is this conversion possible? Is there something I am missing?
Thanks
~Taichou
I'm not aware of any such tool.
But you can approximate it by slicing up her mockups and using them in your GUI like you would convert a website template from an image to HTML.
As long as her layouts aren't too terribly complex you should be able to get by with flow layouts or relative layouts.
Right click - properties - Background (in Eclipse layout design) might be what you're looking for, but remember a bitmap image won't look the same on many devices with different screen resolutions.

Categories

Resources