ToggleButton and SwitchButton - Android Kotlin

ToggleButton and SwitchButton - Android Kotlin

Vlad Voytenko

4 года назад

6,725 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Toon Zelda
Toon Zelda - 26.01.2023 01:53

Just a note to add to what Vlad said above :).

val rLayout: ConstraintLayout = findViewById(R.id.root_layout)

Add this line to get the background color changed. Android Studio no longer uses synthetic property as stated in description but the keyword you want here is ConstraintLayout. You can get this from your view as under the tree below all the names for each element will show if you hover over them. Reason I was getting an error before was because I had forgot to change ToggleButton after the colon to ConstraintLayout so it was constantly pointing to this line. Overall am really having fun with android studio and find Vlad's videos to be informative even though am not directly in his class this semester!

Ответить
Why Not?
Why Not? - 09.03.2021 19:18

Thank you buddy

Ответить
super turtle
super turtle - 14.07.2020 20:49

This is a very good tutorial! Thank you!

Ответить
Sapto Mudito
Sapto Mudito - 12.04.2020 05:01

Thank you very much. the explanation is very easy to follow.

Ответить
GR F
GR F - 21.11.2019 14:32

Thank you for this! Very easy to follow :)

Ответить