Home | 简体中文 | 繁体中文 | 杂文 | Github | 知乎专栏 | Facebook | Linkedin | Youtube | 打赏(Donations) | About
知乎专栏

26.3. 界面操作

26.3.1. findViewById

			
		var frameLayoutDebug = findViewById<FrameLayout>(R.id.frameLayoutDebug)
        frameLayoutDebug.visibility=View.VISIBLE
			
			
			
var textViewBuildType = findViewById<TextView>(R.id.textViewBuildType)
textViewBuildType.text = BuildConfig.BUILD_TYPE + " 内测版"			
			
			

26.3.2. runOnUiThread

Java 用法

			
runOnUiThread(() -> {

});			
			
			

切到 Kotlin

			
	runOnUiThread {
       	qrcodeFrameLayout.visibility = View.VISIBLE
    }