Saturday, October 27, 2018

Tuning Your Apps In Addition To Games For Long Concealment Devices

Posted past times Fred Chung, Developer Advocate

In recent months, there's a growing tendency for handset makers to shipping novel devices amongst long concealment expression ratio (stretching beyond 16:9), many of which also sport rounded corners. This attests to the Android ecosystem's breadth as well as choice. Pixel 2 XL as well as Huawei Mate 10 Pro are but 2 of many examples. These concealment characteristics could convey a really immersive sense to users as well as they get got observe of apps as well as games that don't get got payoff of the long expression ratio concealment on these novel devices. Therefore it is of import for developers to optimize for these concealment designs. Let's get got a expect at related back upward provided past times the Android OS.

Optimize for long expression ratio screens

Most apps using measure UI widgets volition probable travel out-of-the-box on these devices. Android documentation details techniques for flexibly working on multiple concealment sizes. However, some games as well as apps amongst custom UIs may encounter issues due to wrong assumptions on sure enough expression ratios. We're sharing a few typical issues faced past times developers, as well as hence y'all tin pay attending to those relevant to you:

  • Certain sides of the concealment are cropped. This makes whatever graphic or UI elements inwards the affected regions expect incomplete.
  • Touch targets are commencement from UI elements (e.g. buttons). Users may last confused on UI elements that are seemingly interactive.
  • For total concealment vogue on rounded corners devices, any UI elements really but about the corners may last exterior of the curved corner viewable area. Imagine if a commerce app's "Purchase" push was partially obstructed? We recommend referencing Material Design guidelines past times leaving 16dp side margins inwards layouts.

If responsive UI is actually non suitable for your situation, as a final resort declare an explicit maximum supported expression ratio equally follows. On devices amongst a wider expression ratio, the app volition last shown inwards a compatibility vogue padded amongst letterbox. Keep inwards postulate heed that sure enough device models render an override for users to strength the app into full-screen compatibility mode, as well as hence last sure enough to essay out nether these scenarios too!

Targets API score 26 or higher: Use android:maxAspectRatio attributes.

Targets API score 25 or lower: Use android.max_aspect meta-data. Note that maximum expression ratio values volition last respected alone if your activities don't back upward resizableActivity. See documentation for detail.

System letterboxes an app when the declared maximum expression ratio is smaller than the device's screen.

Consider using side-by-side activities

Long expression ratio devices enable fifty-fifty to a greater extent than multi-window role cases that could growth user productivity. Beginning inwards Android 7.0, the platform offers a measure means for developers to implement multi-window on supported devices equally good equally perform information drag as well as drib betwixt activities. Refer to documentation for details.

Testing is crucial. If y'all don't get got access to 1 of these long concealment devices, last sure enough to essay out on the emulator amongst adequate concealment size as well as resolution hardware properties, which are explained inwards the emulator documentation.

We know y'all desire to please your users amongst long concealment devices. With a few steps, y'all tin ensure your apps as well as games taking total payoff of these devices!

Related Post

Tuning Your Apps In Addition To Games For Long Concealment Devices
4/ 5
Oleh