Комментарии:
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!
Thank you buddy
ОтветитьThis is a very good tutorial! Thank you!
ОтветитьThank you very much. the explanation is very easy to follow.
ОтветитьThank you for this! Very easy to follow :)
Ответить