• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 package com.airbnb.lottie.samples
2 
3 import android.os.Bundle
4 import android.view.View
5 import android.view.ViewTreeObserver
6 import androidx.appcompat.app.AppCompatActivity
7 import kotlinx.android.synthetic.main.activity_typography_demo.*
8 
9 class TypographyDemoActivity : AppCompatActivity() {
<lambda>null10     private val layoutListener = ViewTreeObserver.OnGlobalLayoutListener {
11         scrollView.fullScroll(View.FOCUS_DOWN)
12     }
13 
onCreatenull14     override fun onCreate(savedInstanceState: Bundle?) {
15         super.onCreate(savedInstanceState)
16         setContentView(R.layout.activity_typography_demo)
17         fontView.viewTreeObserver.addOnGlobalLayoutListener(layoutListener)
18     }
19 
20 
onDestroynull21     override fun onDestroy() {
22         fontView.viewTreeObserver.removeOnGlobalLayoutListener(layoutListener)
23         super.onDestroy()
24     }
25 }
26