The widget exploration app
We have just discussed six widgets – EditText
, ImageView
, RadioButton
(and RadioGroup
), Switch
, CheckBox
, and TextClock
. Let's make a working app and do something practical with each of them. We will also use a Button
widget and a TextView
widget again as well.
In this layout, we will use LinearLayout
as the layout type that holds everything, and within LinearLayout
, we will use multiple RelativeLayout
instances.
RelativeLayout
has been superseded by ConstraintLayout
, but they are still commonly used and are worth playing around with. You will see as you build layouts within RelativeLayout
that the UI elements behave very much the same as ConstraintLayout
, but that the underlying XML is different. It is not necessary ...
Get Android Programming with Kotlin for Beginners now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.