Android Screen Size Get getScreenWidth(Display display)

Here you can find the source of getScreenWidth(Display display)

Description

get Screen Width

Declaration

public static int getScreenWidth(Display display) 

Method Source Code

//package com.java2s;

import android.graphics.Point;

import android.view.Display;

public class Main {
    public static int getScreenWidth(Display display) {
        Point size = getDisplaySize(display);
        return size.x;
    }/*from w  w w .  ja  v  a  2  s.  co  m*/

    public static Point getDisplaySize(Display display) {
        Point size = new Point();
        display.getSize(size);
        return size;
    }
}

Related

  1. getScreenHeight(Context context)
  2. getScreenHeight(Display display)
  3. getScreenPixel(Activity activity)
  4. getScreenWidth(Context context)
  5. getScreenWidth(Context context)
  6. getScreenSizePixels(Context ctx)
  7. getRealScreenDimensions(Context context)
  8. getScreenHeight(Context context)
  9. getScreenSize(@Nonnull Context context)