@Override public void onDisplayChanged(int displayId) { Log.i(TAG, "onDisplayChanged. id= " + displayId + " " + mDisplayManager.getDisplay(displayId).toString()); mWorkHandler.obtainMessage(MODE_CHANGED_MSG).sendToTarget(); } };
/** * Called when the Info button next to a display is clicked to show information * about the display. */ @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(); }
/** * Called when the Info button next to a display is clicked to show information * about the display. */ @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(); }
Log.d(TAG,"Display"+display.toString());