Hi.
I have followed the instructions to change the XML.
However, your preview of the layout (pg.19) has the Canberra is the capital of Australia and its 2 buttons below it at the center. My layout of the text and 2 buttons appears at the top left hand corner (please see attached file).
Thanks for helping.
Chit
Have you completed Listing 1.2 and set the gravity
to center
for the outer LinearLayout
?
Hi. Thanks.
I did that. Emulator does not work well, I used a actual device and it is working well now.
Thanks again, appreciate it.
I needed to add this line to the first LinearLayout to get it to be centered:
android:layout_gravity=“center”
1 Like