ToggleButton and SwitchButton - Android Kotlin
Attention : Android development team deprecated use of synthetic property, so some changes are required to do in the code
@1:40 You have to use findViewById(R.id. togglebutton1) - to access this recourse from a main layout :
val toggle: ToggleButton = findViewById(R.id.toggleButton1)
toggle.setOnCheckedChangeListener { ...
@5:00 You have to do the same for Switch - use findViewById(R.id. switch1) - to access this recourse from a main layout:
... similar approach as for button above ...
The reason behind those changes: Android development team deprecated use of synthetic property ( they said it will be completely eliminated soon).
On this page of the site you can watch the video online ToggleButton and SwitchButton - Android Kotlin with a duration of hours minute second in good quality, which was uploaded by the user Vlad Voytenko 26 September 2019, share the link with friends and acquaintances, this video has already been watched 6,752 times on youtube and it was liked by 62 viewers. Enjoy your viewing!