Get Display Metrics - Android User Interface

Android examples for User Interface:Display

Description

Get Display Metrics

Demo Code


//package com.java2s;
import android.app.Activity;

import android.util.DisplayMetrics;

public class Main {

    public static DisplayMetrics getDisplayInfo(Activity paramActivity) {
        return paramActivity.getResources().getDisplayMetrics();
    }/*from  w ww . jav a2  s  . c o m*/
}

Related Tutorials