Example usage for android.view Display getSupportedModes

List of usage examples for android.view Display getSupportedModes

Introduction

In this page you can find the example usage for android.view Display getSupportedModes.

Prototype

public Mode[] getSupportedModes() 

Source Link

Document

Gets the supported modes of this display.

Usage

From source file:com.quectel.presentationtest.PresentationTest.java

/**
 * Called when a display mode has been selected.
 *///from  ww  w . j  a  v  a  2  s  .  c  om
@Override
public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {
    final Display display = (Display) parent.getTag();
    final Display.Mode[] modes = display.getSupportedModes();
    setPresentationDisplayMode(display,
            position >= 1 && position <= modes.length ? modes[position - 1].getModeId() : 0);
}