Wednesday, March 29, 2017

Google makes sure developers know how to build an app that looks good on the Galaxy S8 and LG G6

"Super widescreen" phones need some special attention if you want your app to look great.

The age of larger display format phones is here. LG's G6 sports an 18:9 screen aspect ratio and the Galaxy S8 brought an 18.5:9 display to the party. Since those two phones will be the most popular high-end Android models for 2017, Google has posted a quickie on the Android Developers blog to make sure everyone building an app knows how to take advantage of all the screen, all the time.

This isn't anything new. For better or worse, Android apps support scaling and resizing really well and it only takes a few lines of code to make sure an app uses the screen without being squished, stretched or sporting the dreaded black bars of nothingness.

First, you need to make sure the maximum aspect ratio is expressed as a floating-point number instead of an integer in the app's <application> element. Then make sure your app supports an aspect ratio of 2.1 or higher. Set this in the <application> element, too. You'll find complete instructions and a bit of demo code at the Android Developers site.

These two small changes will make a world of difference for everyone who uses a phone with a large-format aspect ratio and we expect to see more phones adopt it and join the "super widescreen" world.



from Android Central - Android Forums, News, Reviews, Help and Android Wallpapers http://ift.tt/2ozxMwR
via IFTTT

No comments:

Post a Comment