[英]why kotlin activity xml doesn't have related files
we've an icon in layout.xml
files which will show the related files. 我们在
layout.xml
文件中有一个图标,它将显示相关文件。
For Java Activity, when I click this icon, I'm able to go to the related Activity. 对于Java活动,当我单击此图标时,可以转到相关的活动。
But Kotlin Activity's xml says that there are no related files. 但是Kotlin Activity的xml表示没有相关文件。
whereas I do have a related Activity. 而我确实有相关的活动。
class SelectedAssets : AppCompatActivity() {
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setContentView(R.layout.-----selected_assets_activity)
}
}
Any settings do I need to do in order to get the related kotlin files/activities 我需要进行任何设置才能获取相关的Kotlin文件/活动
您应该添加tools:context="packagename.YourActivity"
将其链接到类文件
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.