Android Tips

”端末の画面サイズの取得”

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

WindowManager windowmanager = (WindowManager)getSystemService(WINDOW_SERVICE);
Display disp = windowmanager.getDefaultDisplay();
int d_width=disp.getWidth(); //画面の幅サイズの取得
int d_height=disp.getHeight(); //画面の高さサイズの取得

Designed by CSS.Design Sample