Optimizing for Layout on Kindle Fire HD

Kindle Fire HD has a 7" high-density (hdpi) screen supporting a resolution of 1280 x 800 pixels (a 16:10 aspect ratio). This provides a great opportunity to revisit the design of existing apps to take advantage of the extra space and optimize your app layout for both portrait and landscape orientation.

Normally, there is a 35 pixel status bar overlaid at the top of the screen, along with an area allocated to the soft key toolbar that is dynamically positioned based on the orientation of the tablet.

In portrait mode, the soft key toolbar overlays the bottom78 pixels (giving a total usable area of 800 pixels wide by 1167 pixels high),and in landscape mode, it overlays the rightmost 78 pixels (giving usable dimensions of 1202 pixels wide by 765 pixels high).

Layouts-1

If your app needs to use more of the screen (e.g., in a game or playing a video), it is possible to shrink the soft key toolbar down to just a 67 x 38 pixels drag handle or hide it completely by using one of the two available full screen modes.

Full Screen Modes

Layouts-2

The standard full screen mode hides the status bar and soft key toolbar but leaves a small drag handle visible: 67 pixels by 38 pixels(wide by high in portrait; high by wide in landscape) floating over the content and centered on the edge of the tablet where the soft key toolbar would have appeared. Tapping the drag handle returns the soft key toolbar to the screen, allowing the user to interact with it. 

 

public void onCreate(Bundle savedInstanceState) {

  super.onCreate(savedInstanceState);

  setContentView(R.layout.main);

  finalView view =getWindow().getDecorView().findViewById(android.R.id.content).getRootView();

  lp.flags= WindowManager.LayoutParams.FLAG_FULLSCREEN;

  getWindow().setAttributes(lp);

}

In full-screen mode for Ice Cream Sandwich (ICS), the drag handle disappears as well. If the user taps anywhere on the screen in this mode,the drag handle will reappear, allowing the user access to the soft key toolbar.

public void onCreate(Bundle savedInstanceState) {                   

  super.onCreate(savedInstanceState);

  setContentView(R.layout.main);

  finalView view =getWindow().getDecorView().findViewById(android.R.id.content).getRootView();

  view.setSystemUiVisibility(View.SYSTEM_UI_FLAG_HIDE_NAVIGATION);

  lp.flags= WindowManager.LayoutParams.FLAG_FULLSCREEN;

  getWindow().setAttributes(lp);

}

There is more information on both full screen modes available in the UserExperience Guidelines. A sample app, covering screen layout modes and how to control the status bar and soft key display, is available at https://developer.amazon.com/sdk/fire/samples.html.

If you are designing your app to support multiple layouts, you may want to take advantage of the new (since API level 13) density pixel configuration qualifier layout resources. For example, since Kindle Fire HD has a layout of 533 dp wide (in portrait mode), you would place your resource definition inlayout-sw530dp .This is derived from the fact that Kindle Fire HD is an hdpi device and uses a generalized dpi of 240 for dp calculations. The width is computed using the following: width = (800/ (240/160)). See this article on Supporting Multiple Screens for more information.

In addition to optimizing the layout for the size of the device, you should also supply appropriate density graphics for your app, or make use of vector graphics. This ensures that the experience scales smoothly and efficiently, making the best use of the hardware capabilities and creating the best possible user experience.

Although it is usually a better experience if you design your app to support both landscape and portrait modes, in some cases you will want to lock orientation to better fit the design—for instance, a full screen game or video player. If you choose to control the orientation of your app, you should review the recommendations to ensure the best experience for the user.

For more information on this topic you can refer to the App Optimization and User Experience guidelines.

Unavailable During Maintenance