Example usage for android.view Display toString

List of usage examples for android.view Display toString

Introduction

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

Prototype

@Override
    public String toString() 

Source Link

Usage

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

/**
 * Called when the Info button next to a display is clicked to show information
 * about the display.// ww w.  j av  a2s .c  o m
 */
@Override
public void onClick(View v) {
    Context context = v.getContext();
    AlertDialog.Builder builder = new AlertDialog.Builder(context);
    final Display display = (Display) v.getTag();
    Resources r = context.getResources();
    AlertDialog alert = builder
            .setTitle(r.getString(R.string.presentation_alert_info_text, display.getDisplayId()))
            .setMessage(display.toString())
            .setNeutralButton(R.string.presentation_alert_dismiss_text, new DialogInterface.OnClickListener() {
                @Override
                public void onClick(DialogInterface dialog, int which) {
                    dialog.dismiss();
                }
            }).create();
    alert.show();
}