Discussion Forums  >  Plugins, Customizing, Source Code

Replies: 23    Views: 57

Alex@TM
Apple Fan
Profile
Posts: 956
Reg: Dec 20, 2011
London, UK
10,560
07/08/13 05:50 AM (12 years ago)

Android development Questions

Hi all, Im starting out in Android having been an iOS only developer for numerous years. I have installed eclipse and have imported a BT project and run it successfully in the emulator. My questions are: What is the best size device to target for? Do images downscale to smaller devices? My thought is create large images and hope they get smaller! How do I know what size of images to use? These issues that iPhone just doesnt encounter. Many thanks.
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
07/08/13 06:26 AM (12 years ago)
1) No such thing. Android sizes and resolutions vary. The first thing everyone should read is: http://coding.smashingmagazine.com/2011/06/30/designing-for-android/ 2) They do, but things tend to get 'scrunched' if they're not specifically designed for that particular screen/resolution. 3) The iPhone encounters them, you just haven't had to deal with it yet. With images, iPhone only has image.png and [email protected], but when you start customizing for different iPhones and iPads using xib files, they're scattered from here to eternity :) Of course, that's nothing compared to the thousands of Android xml files you'd be designing if you wanted to cover 'everything'. My (perhaps faulty) direction is usually design for my wife's Galaxy Nexus, because it screws up the most. If it looks good on that, and my tablet, it seems to also work well on "most" similar models. Nothing screws up a nice layout like the Galaxy Nexus. :) If you want the most bang for the buck, make 3 sets of images; image.png, [email protected], and [email protected] - using the first two for iOS and the whole 3 for Android. This is just my take on it; your mileage may vary. Cheers! -- Smug
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
07/08/13 06:34 AM (12 years ago)
Great points Smug. The other issue with downsizing images is the amount of available memory. Load too many large images and you'll get a crash - regardless of the amount of downsizing you're doing.
 
Alex@TM
Apple Fan
Profile
Posts: 956
Reg: Dec 20, 2011
London, UK
10,560
like
07/08/13 06:40 AM (12 years ago)
Cracking, thanks Smug. 1) Brilliant link, thanks I'll get a good look at that. 2) Bugger! 3) I know all about the mess images can make since the new iphone particularly but I use autolayout in nib files which seems to have sorted most of the issues I was suffering with. 4) So set my emulator to the size of the Galaxy Nexus a tablet, say the Nexus 7? Will the correct device take the correct image, .png, @2x.png or @3x.png as it does in xcode? I would rather just design for android phone, not tablet, I suspect this is not an option! If images are too small for a particular device, what happens then...?! Do you tend to stick to the same sizes for your 3 images options? Sorry Smug, you'll wish you never answered!! All the best.
 
Alex@TM
Apple Fan
Profile
Posts: 956
Reg: Dec 20, 2011
London, UK
10,560
like
07/08/13 06:40 AM (12 years ago)
@chris, thanks for the advice too :)
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
07/08/13 06:43 AM (12 years ago)
The problem with Android phones vs tablets is the line is really blurry. If you have an undersized image on a device, it will have low resolution.
 
Alex@TM
Apple Fan
Profile
Posts: 956
Reg: Dec 20, 2011
London, UK
10,560
like
07/08/13 06:47 AM (12 years ago)
So I need to find out what the largest tablet is and make the @3 image fit that I guess.
 
tb
buzztouch Evangelist
Profile
Posts: 2050
Reg: Nov 03, 2011
Oxford
32,300
like
07/08/13 02:45 PM (12 years ago)
I have no Android experience, although I'm about to indulge, but if you use the Header image plugins, you just need one size super massive, and the plugin does the rest.
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
07/08/13 02:53 PM (12 years ago)
The problem with that approach is that memory is at a premium on many Android devices. Having a super massive image will likely crash the app.
 
tb
buzztouch Evangelist
Profile
Posts: 2050
Reg: Nov 03, 2011
Oxford
32,300
like
07/08/13 02:59 PM (12 years ago)
That's a valid point to make. iPhones are 16GB, 32GB and a few at 64GB. There aren't many 8GB devices, but that is the lowest capacity. This means that size doesn't matter too much. But I used to have an Android (which I got so annoyed about that I chucked it into the sea) that only had 512MB of storage, and the phone could take a maximum of 1GB. Therefore, do be more cautious with the app size.
 
Alex@TM
Apple Fan
Profile
Posts: 956
Reg: Dec 20, 2011
London, UK
10,560
like
07/08/13 03:08 PM (12 years ago)
First impressions.. Android is horrible! True, i'm not developing on a device, the simulator is random, works, doesnt work, works but takes hours to launch, 600 million screen sizes. Ummm.
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
07/08/13 03:16 PM (12 years ago)
lol - yes, most of us despise Android. But, once you get familiar with it, it's not bad. Hopefully David's updates will make things easier/better. @Annandale Apps - I was actually talking about RAM memory, not hard-disk memory. Although that is a problem too - that's why I left Android for Apple with my last phone - I was tired of not being able to install more than about a half-dozen apps on my EVO because it told me I was out of room!
 
Alex@TM
Apple Fan
Profile
Posts: 956
Reg: Dec 20, 2011
London, UK
10,560
like
07/08/13 03:25 PM (12 years ago)
A basic menu with header wont load in the sim on a screen 480x800 or 1280x800 I'm trying to just look at it and it wont load. logcat and console are now not even displaying anything when it builds!
 
chris1
Code is Art
Profile
Posts: 3862
Reg: Aug 10, 2012
Austin, TX
50,120
like
07/08/13 03:28 PM (12 years ago)
Could be your simulator got disconnected from Eclipse/Android Studio - happens to me all the time (actually, about 50% of the time). Try closing the simulator and then pressing 'run' again.
 
Alex@TM
Apple Fan
Profile
Posts: 956
Reg: Dec 20, 2011
London, UK
10,560
like
07/08/13 03:30 PM (12 years ago)
I'm closing it, quitting it, closing eclipse, etc!! And this is the end result! https://copy.com/dGXPdDRkypHK
 
Alex@TM
Apple Fan
Profile
Posts: 956
Reg: Dec 20, 2011
London, UK
10,560
like
07/08/13 03:38 PM (12 years ago)
Actually, upon unlocking the device it has shown the app, but its not loading the screen, whats the usual reason for this? Cheers
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
07/08/13 03:40 PM (12 years ago)
Another thing about the simulator... it's not speedy. At ALL. When it does run, it doesn't 'run', it crawls. Cheers! -- Smug
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
07/08/13 03:42 PM (12 years ago)
It may need more time, or there may be an issue. The LogCat will be your main troubleshooting tool. Learn that part of Android/Eclipse, because you'll find it about the only real 'responsive' part about Java Dev, heh. Cheers! -- Smug
 
Alex@TM
Apple Fan
Profile
Posts: 956
Reg: Dec 20, 2011
London, UK
10,560
like
07/08/13 03:42 PM (12 years ago)
Haha, cheers! although logcat is as blank as a hermits address book too! Whats this doing? No data and the homescreen it comes with out of the box, not what i've changed it to..!!? Cheers :) This is sort of fun though :/ https://copy.com/ivdXQYM6404c
 
Alex@TM
Apple Fan
Profile
Posts: 956
Reg: Dec 20, 2011
London, UK
10,560
like
07/08/13 03:46 PM (12 years ago)
And here is logcat and the default screen, not my loaded screen :( https://copy.com/66m0jh7bVmKB
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
07/08/13 03:47 PM (12 years ago)
Does the console show anything? It should, even if it doesn't make it to the LogCat. Check Mark's (GNW) document on setting up the Android debugger... It's about half-way down... it helps :) https://www.buzztouch.com/files/howtos/Problem_Reporting_and_Basic_Debug_v1.0.pdf Cheers! -- Smug
 
SmugWimp
Smugger than thou...
Profile
Posts: 6316
Reg: Nov 07, 2012
Tamuning, GU
81,410
like
07/08/13 03:49 PM (12 years ago)
And the 'refresh' on Android isn't as solid as in Xcode... the 'manual' refresh key is typically the menu button... you might try a refresh, just to see if it's old config data messing with you... Cheers! -- Smug
 
Alex@TM
Apple Fan
Profile
Posts: 956
Reg: Dec 20, 2011
London, UK
10,560
like
07/08/13 03:49 PM (12 years ago)
I've added the new config data manually!
 
Alex@TM
Apple Fan
Profile
Posts: 956
Reg: Dec 20, 2011
London, UK
10,560
like
07/08/13 03:51 PM (12 years ago)
I'll take another look at that thanks. I've had some results from it but now it's just stopped spewing anything!
 

Login + Screen Name Required to Post

pointerLogin to participate so you can start earning points. Once you're logged in (and have a screen name entered in your profile), you can subscribe to topics, follow users, and start learning how to make apps like the pros.