add lifecycle text
This commit is contained in:
parent
510f37dd20
commit
9ef79d0e5e
@ -126,6 +126,12 @@ class MainActivity : AppCompatActivity(), View.OnClickListener {
|
||||
if (isReceptionShow) {
|
||||
ViewModleMain.isVisible.postValue(true)
|
||||
}
|
||||
binding.textView.text = "onResume"
|
||||
}
|
||||
|
||||
override fun onPause() {
|
||||
super.onPause()
|
||||
binding.textView.text = "onPause"
|
||||
}
|
||||
|
||||
override fun onStop() {
|
||||
|
||||
@ -39,5 +39,11 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:text="恢复初始状态" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="TextView" />
|
||||
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user