抱歉新手问题我有 2 个用于 switchcase 的 .java main.java
public boolean onOptionsItemSelected(MenuItem item){
switch (item.getItemId()) {
case R.id.hint:
coba = new GameBoard();
coba.deklarasigambar();
break;
........................
和其他 .java 将获得宽度屏幕
public void deklarasigambar(){
DisplayMetrics met = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(met);
layar = met.heightPixels;
Toast.makeText(getApplicationContext(), ""+layar, 3);
}
我逼近了……但是当我放
DisplayMetrics met = new DisplayMetrics();
getWindowManager().getDefaultDisplay().getMetrics(met);
layar = met.heightPixels;
Toast.makeText(getApplicationContext(), ""+layar, 3);
在
case R.id.hint:
我得到了价值,抱歉英语不好:(