Android view setVisibility():
有三個參數:Parameters: visibility One of VISIBLE , INVISIBLE , GONE,
對應的常量值:0、4、8
VISIBLE:0 意思是可見的
INVISIBILITY:4 意思是不可見的,但還佔著原來的空間
GONE:8 意思是不可見的,不佔用原來的佈局空間
View Code
LinearLayout num_Layout = (LinearLayout) findViewById(R.id.num_layout);
if (numberOfRecord > 0){
TextView num = (TextView) findViewById(R.id.num);
num.setText(numberOfRecord.toString() );
num_Layout.setVisibility(0);
}
else {
num_Layout.setVisibility(8);
}
2016年10月27日
2016年10月4日
Android Studio You can also reset/revoke a specific permissions using
Android Studio
You can also reset/revoke a specific permissions using
adb shell pm grant com.your.flashlight android.permission.CAMERA
adb shell pm revoke com.your.package android.permission.CAMERA
adb shell pm grant android.permission.CAMERA
adb shell pm reset-permissions
you should also add C:/android-sdk/platform-tools to you environment path
訂閱:
文章 (Atom)