Tabnine Logo
PresentationActivity$DemoPresentation.getDisplay
Code IndexAdd Tabnine to your IDE (free)

How to use
getDisplay
method
in
com.example.android.apis.app.PresentationActivity$DemoPresentation

Best Java code snippets using com.example.android.apis.app.PresentationActivity$DemoPresentation.getDisplay (Showing top 4 results out of 315)

origin: li2/learning-android-open-source

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    // Be sure to call the super class.
    super.onCreate(savedInstanceState);
    // Get the resources for the context of the presentation.
    // Notice that we are getting the resources from the context of the presentation.
    Resources r = getContext().getResources();
    // Inflate the layout.
    setContentView(R.layout.presentation_content);
    final Display display = getDisplay();
    final int displayId = display.getDisplayId();
    final int photo = mContents.photo;
    // Show a caption to describe what's going on.
    TextView text = (TextView)findViewById(R.id.text);
    text.setText(r.getString(R.string.presentation_photo_text,
        photo, displayId, display.getName()));
    // Show a n image for visual interest.
    ImageView image = (ImageView)findViewById(R.id.image);
    image.setImageDrawable(r.getDrawable(PHOTOS[photo]));
    GradientDrawable drawable = new GradientDrawable();
    drawable.setShape(GradientDrawable.RECTANGLE);
    drawable.setGradientType(GradientDrawable.RADIAL_GRADIENT);
    // Set the background to a random gradient.
    Point p = new Point();
    getDisplay().getSize(p);
    drawable.setGradientRadius(Math.max(p.x, p.y) / 2);
    drawable.setColors(mContents.colors);
    findViewById(android.R.id.content).setBackground(drawable);
  }
}
origin: qiubiteme/android_api_demos

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    // Be sure to call the super class.
    super.onCreate(savedInstanceState);
    // Get the resources for the context of the presentation.
    // Notice that we are getting the resources from the context of the presentation.
    Resources r = getContext().getResources();
    // Inflate the layout.
    setContentView(R.layout.presentation_content);
    final Display display = getDisplay();
    final int displayId = display.getDisplayId();
    final int photo = mContents.photo;
    // Show a caption to describe what's going on.
    TextView text = (TextView)findViewById(R.id.text);
    text.setText(r.getString(R.string.presentation_photo_text,
        photo, displayId, display.getName()));
    // Show a n image for visual interest.
    ImageView image = (ImageView)findViewById(R.id.image);
    image.setImageDrawable(r.getDrawable(PHOTOS[photo]));
    GradientDrawable drawable = new GradientDrawable();
    drawable.setShape(GradientDrawable.RECTANGLE);
    drawable.setGradientType(GradientDrawable.RADIAL_GRADIENT);
    // Set the background to a random gradient.
    Point p = new Point();
    getDisplay().getSize(p);
    drawable.setGradientRadius(Math.max(p.x, p.y) / 2);
    drawable.setColors(mContents.colors);
    findViewById(android.R.id.content).setBackground(drawable);
  }
}
origin: qiubiteme/android_api_demos

  @Override
  public void onDismiss(DialogInterface dialog) {
    DemoPresentation presentation = (DemoPresentation)dialog;
    int displayId = presentation.getDisplay().getDisplayId();
    Log.d(TAG, "Presentation on display #" + displayId + " was dismissed.");
    mActivePresentations.delete(displayId);
    mDisplayListAdapter.notifyDataSetChanged();
  }
};
origin: li2/learning-android-open-source

  @Override
  public void onDismiss(DialogInterface dialog) {
    DemoPresentation presentation = (DemoPresentation)dialog;
    int displayId = presentation.getDisplay().getDisplayId();
    Log.d(TAG, "Presentation on display #" + displayId + " was dismissed.");
    mActivePresentations.delete(displayId);
    mDisplayListAdapter.notifyDataSetChanged();
  }
};
com.example.android.apis.appPresentationActivity$DemoPresentationgetDisplay

Popular methods of PresentationActivity$DemoPresentation

  • <init>
  • dismiss
  • findViewById
  • getContext
  • setContentView
  • setOnDismissListener
  • show
  • getWindow
  • setPreferredDisplayMode
    Sets the preferred display mode id for the presentation.

Popular in Java

  • Reactive rest calls using spring rest template
  • getSystemService (Context)
  • addToBackStack (FragmentTransaction)
  • compareTo (BigDecimal)
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Iterator (java.util)
    An iterator over a sequence of objects, such as a collection.If a collection has been changed since
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • ImageIO (javax.imageio)
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now