Android Screen Size Get getDisplayWidth(Context context)

Here you can find the source of getDisplayWidth(Context context)

Description

get Display Width

Declaration

public static synchronized int getDisplayWidth(Context context) 

Method Source Code

//package com.java2s;
import android.content.Context;

import android.view.Display;
import android.view.WindowManager;

public class Main {
    public static synchronized int getDisplayWidth(Context context) {
        Display display = ((WindowManager) context
                .getSystemService(Context.WINDOW_SERVICE))
                .getDefaultDisplay();// w  w  w . j  a  v a  2  s  . c o  m
        return display.getWidth();
    }
}

Related

  1. getScreenSize(Context ctx)
  2. getMinTouchHeight(Context context)
  3. getMinTouchWidth(Context context)
  4. getDisplayHeight(Context context)
  5. getDisplayMetrics(Context context)
  6. getRawDisplayHeight(Context context)
  7. getScreenHeight(Context context)
  8. getScreenWidth(Context context)
  9. getStatusHeight(Context context)