美文网首页
垃圾代码

垃圾代码

作者: 简单点儿吧 | 来源:发表于2022-10-20 11:15 被阅读0次
    //内部类
    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"
                    />
    

    相关文章

      网友评论

          本文标题:垃圾代码

          本文链接:https://www.haomeiwen.com/subject/xxtmzrtx.html