//内部类
private class InnerClass{
public void doSomething(){
setTestStaticValue("123");
getTestStaticValue();
setTestValue("test_value");
getTestValue();
}
private void doLog() {
Log.d("un_use_log_tag","un_use_log_dolog");
}
}
//成员变量和方法
private String testValue="fdksajfljklds";
private String getTestValue() {
return testValue;
}
private void setTestValue(String testValue) {
this.testValue = testValue;
}
//静态成员变量和方法
private static String testStaticValue="TestValue";
private static String getTestStaticValue() {
return testStaticValue;
}
private static void setTestStaticValue(String value) {
testStaticValue = value;
}
private MainActCtrl ctrl = new MainActCtrl(this);
@Override
public void onResume() {
super.onResume();
ctrl.onResume();
}
@Override
public void onStart() {
super.onStart();
ctrl.onStart();
}
@Override
public void onPause() {
super.onPause();
ctrl.onPause();
}
public void onResume() {
Log.d("un_use_log_tag","un_use_log_onResume");
}
public void onStart() {
Log.d("un_use_log_tag","un_use_log_onStart");
}
public void onPause() {
Log.d("un_use_log_tag","un_use_log_onPuase");
}
fun onResume() {
Log.d("un_use_log_tag","un_use_log_onResume");
}
fun onStart() {
Log.d("un_use_log_tag","un_use_log_onStart");
}
fun onPause() {
Log.d("un_use_log_tag","un_use_log_onPause");
}
<View
android:layout_width="1dp"
android:layout_height="1dp"
android:visibility="gone"
/>
网友评论