File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
app/src/main/kotlin/info/appdev/chartexample/fragments Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -13,21 +13,25 @@ import androidx.core.net.toUri
1313import androidx.fragment.app.Fragment
1414import androidx.fragment.app.FragmentManager
1515import androidx.fragment.app.FragmentPagerAdapter
16- import androidx.viewpager.widget.ViewPager
1716import com.google.android.material.snackbar.Snackbar
1817import info.appdev.chartexample.R
18+ import info.appdev.chartexample.databinding.ActivityAwesomedesignBinding
1919import info.appdev.chartexample.notimportant.DemoBase
2020
2121/* *
2222 * Demonstrates how to keep your charts straight forward, simple and beautiful with the AndroidChart library.
2323 */
2424class ViewPagerSimpleChartDemo : DemoBase () {
25+
26+ private lateinit var binding: ActivityAwesomedesignBinding
27+
2528 override fun onCreate (savedInstanceState : Bundle ? ) {
2629 super .onCreate(savedInstanceState)
27- setContentView(R .layout.activity_awesomedesign)
28- val pager = findViewById<ViewPager >(R .id.pager)
29- pager.offscreenPageLimit = 3
30- pager.adapter = PageAdapter (supportFragmentManager)
30+ binding = ActivityAwesomedesignBinding .inflate(layoutInflater)
31+ setContentView(binding.root)
32+
33+ binding.pager.offscreenPageLimit = 3
34+ binding.pager.adapter = PageAdapter (supportFragmentManager)
3135
3236 showSnackbar(" Swipe left and right for more awesome design examples!" )
3337 }
You can’t perform that action at this time.
0 commit comments