Open the ConstraintLayout
that was auto-generated when we created the project. It probably is already in a tab at the top of the editor. If not, it will be in the res
/layout
folder. Its name is activity_main.xml
.
Inspect the XML in the Text tab and note that it is empty apart from a TextView
that says Hello World
. Switch back to the Design tab, left-click the TextView
to select it, and tap the Delete key to get rid of it.
Now we can build ourselves a simple, yet intricate, UI. ConstraintView
is very useful when you want to position parts of your UI very precisely and/or relative to the other parts.
To get started, look in the Widgets category of the palette and find the CalenderView
. Drag and drop the CalenderView
near the top and horizontally central. As you drag the CalenderView
around, notice that it jumps/snaps to certain locations.
Also notice the subtle visual cues that show when the view is aligned. I have highlighted...