super.onCreate(savedInstanceState);
TextView t = (TextView)findViewById在MainActivity类中,我找到了一个PlaceHolder类,它扩展了Fragment类,并使用rootView.findViewById()在onCreateView()中移动TextView在Google的示例中,他们使用活动栏扩展了MainActivity类,活动栏是Fragment的子类,但是,实际上,我
我看到很多视频说Kotlin可以在MainActivity.kt中自动识别按钮(视图)我试过了,但在android studio 4.1中,当我使用常用代码时,它不起作用: var button_name= findViewById(R.id.buttonName) 它工作得很好,但是当我像这样直接使用代码时: buttonName.setonclicklistiner{} IDE无法识别该按钮 PS