Someone please educate me on android resolution fragmentation

Posted:
in iPhone edited January 2014


Ok, I need to know how this works.  When Apple introduced the iPhone 5, they simply stretched the screen so that it maintained the 640 width in pixels and increased the length to 1136.  From what I understand, this was a huge help to app designers because they didn't have to deal with a whole new resolution factor, but could just scale their apps to neatly fit the new iPhone form factor.  This makes sense to me.


 


But how does this work on Andriod devices?  For example, the new Samsung S4 was just announced.  Samsung has increased the resolution from 1280x720 to 1920x1080 (full 1080).  This sounds great as I'm sure the screen will look super sharp and brilliant.  However, what does this do to Andriod apps?  How will an app that is designed to fit on a S3 look when displaying on a S4?  Will it be stretched and pixelated?  Does Andriod have a way to successfully scale these apps?  


 


From what I understand, this is one of the issues in the Andriod ecosystem.  The massive fragmentation of lots of phones with lots of different resolutions.  How do app developers deal with this?  Is the fact that the S4 has a very high resolution not a big deal because apps are going to look like crap on it (unless the devs customize their apps to fit it?).


 


thanks for the feedback.  I've been wondering about this issue for quite some time, and have not had the chance to actually test it on a Andriod device.

Comments

  • Reply 1 of 4
    MarvinMarvin Posts: 15,324moderator
    rattlhed wrote: »
    Does Andriod have a way to successfully scale these apps?

    It does beyond Android 3.2 (arrived mid-2011):

    http://developer.android.com/guide/practices/screens_support.html

    More than 55% of Android users are still on Android 2.x or less:

    http://bgr.com/2013/02/08/android-version-distribution-february-2013-316698/

    but the newer phones with the latest OS should scale apps if the developer has used the right APIs. If they haven't, the user gets the black borders round the app.

    If apps have a fixed layout, this will be a pain for developers as there are tons of different resolutions and having so many users on Android 2.x will make matters worse. In terms of real world damage, it's hard to say. People seem to still be buying them and not complaining. The newest machines with higher resolutions will scale and Samsung products make up 50% or more of all Android devices so developers will support the most popular phones.

    Malware is a problem, fragmentation is a problem, fumbling with a large screen is a problem but they come with some benefits like having more places to get software, more hardware choices, more OS functionality and lower prices. With anything, people take the good with the bad. If someone can get an S4 for $500 instead of paying $600+ for an iPhone, chances are they'll use it for a few apps and sing its praises about how it's a fraction of the price of the iPhone and better in every way despite not using it in a way that shows up the flaws. The phone market is consumer space and the consumer incentive is the best deals on the best products. If 50%+ (this is over 250m people) are happy with Android 2.x or less then they aren't a very discerning crowd.
  • Reply 2 of 4
    kdarlingkdarling Posts: 1,640member

    Quote:

    Originally Posted by Marvin View Post



    It does beyond Android 3.2 (arrived mid-2011):


     


    Resolution independence has been around since Android 1.6.   Version 3.2 simply added another way of doing it on tablets.  And no, you don't usually see black borders.  That's more of an iOS thing.


     


    There are two ways to write an app:  hardcode it to certain pixel perfect sizes (iOS), or program for multiple general screen size categories (Android).   They have different purposes and limitations. 


     


    Web pages have been programmed for resolution independence for years, especially now with more CSS support for auto-detecting screen sizes and applying different styles.  No one would claim that a web developer has to create different code or assets for every pixel width-by-height combination that a browser window can be resized to.  


     


    Likewise, neither do Android developers have to worry that much.  A screen fragmentation "problem" doesn't exist, because in reality there's only a few primary screen size and density categories.


     


    A good calm discussion that I ran across lately on the details, can be read here.

  • Reply 3 of 4
    MarvinMarvin Posts: 15,324moderator
    kdarling wrote: »
    Web pages have been programmed for resolution independence for years, especially now with more CSS support for auto-detecting screen sizes and applying different styles.  <span style="line-height:1.231;">No one would claim that a web developer has to create different code or assets for every pixel width-by-height combination that a browser window can be resized to.  </span>

    A website can leave empty space around the content and the content itself doesn't have to scale up or down to a fixed size, which isn't the case with a mobile device app. Websites are mostly text content too. Desktop applications have some scalable parts to the UI but elements like the Photoshop toolbar are not scalable UI elements. This will have to change somewhat with Retina displays.
    kdarling wrote: »
    Likewise, neither do Android developers have to worry that much.  A screen fragmentation "problem" doesn't exist, because in reality there's only a few primary screen size and density categories.

    There's a link here describing 500 different Android resolutions in web stats:

    http://stephanierieger.com/the-trouble-with-android/

    Obviously developers don't have to code specifically for every single one but bitmap graphics used for UI elements don't inherently scale. If they aren't set properly, they will go blurry:

    http://stackoverflow.com/questions/4425425/android-graphics-are-big-and-blurry
    http://stackoverflow.com/questions/7510066/images-in-app-looks-blurry
    http://developer.android.com/tools/help/draw9patch.html

    That requires creating multiple versions of each bitmap graphic or building repeating bitmaps. Obviously it's not a "problem" if you're not the one that has to do that.

    The biggest problem seems to be facing tablets because the scaling creates another layer of complexity. Not only do they have to account for UI scaling and multiple densities but also the relative column layouts. Do they have enough room to show a left column on a 16:9 7" tablet in portrait vs a 10" 4:3 tablet?

    The best strategy has to be a mix of both having standard layouts so that bitmap content doesn't have to be repeated but encouraging scalable apps to allow for resolution and aspect changes. Apple has done this with iOS 6:

    http://www.raywenderlich.com/20881/beginning-auto-layout-part-1-of-2
  • Reply 4 of 4
    mikeb85mikeb85 Posts: 506member


    Download the Android SDK and Eclipse bundle...  Play around with it yourself, and you'll see.  


     


    Competent developers of course will create all their graphics in vector formats, then export to high-res bitmaps...  It's really not that difficult.  


     


    Also, you can target only 1080p, 720p, qHD and 480p and cover just about the whole Android range.  All recent and upcoming flagships are 1080p or 720p.  Android tools make it fairly easy, and developers should have at least a minimal level of competency...

Sign In or Register to comment.