get Width Pixels - Android Graphics

Android examples for Graphics:Pixel

Description

get Width Pixels

Demo Code


//package com.java2s;

import android.content.Context;

public class Main {
    public static int getWidthPixels(Context context) {
        return context.getResources().getDisplayMetrics().widthPixels;
    }/*from  w w  w  .jav  a2  s . com*/
}

Related Tutorials