|
| 1 | +<?xml version="1.0" encoding="utf-8"?> |
| 2 | +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" |
| 3 | + xmlns:tools="http://schemas.android.com/tools" |
| 4 | + android:id="@+id/activity_main" |
| 5 | + android:layout_width="match_parent" |
| 6 | + android:layout_height="match_parent" |
| 7 | + android:paddingBottom="@dimen/activity_vertical_margin" |
| 8 | + android:paddingLeft="@dimen/activity_horizontal_margin" |
| 9 | + android:paddingRight="@dimen/activity_horizontal_margin" |
| 10 | + android:paddingTop="@dimen/activity_vertical_margin" |
| 11 | + tools:context="com.lenovo.hideandshow.MainActivity"> |
| 12 | + |
| 13 | + <TextView |
| 14 | + android:layout_width="wrap_content" |
| 15 | + android:layout_height="wrap_content" |
| 16 | + android:text="Hello World!" |
| 17 | + android:id="@+id/textView" /> |
| 18 | + |
| 19 | + <Button |
| 20 | + android:text="show" |
| 21 | + android:layout_width="wrap_content" |
| 22 | + android:layout_height="wrap_content" |
| 23 | + android:layout_below="@+id/textView" |
| 24 | + android:layout_marginTop="20dp" |
| 25 | + android:id="@+id/showbutton" |
| 26 | + android:onClick="show" /> |
| 27 | + |
| 28 | + <Button |
| 29 | + android:text="hide" |
| 30 | + android:layout_width="wrap_content" |
| 31 | + android:layout_height="wrap_content" |
| 32 | + android:id="@+id/hideButton" |
| 33 | + android:layout_alignBaseline="@+id/showbutton" |
| 34 | + android:layout_alignBottom="@+id/showbutton" |
| 35 | + android:layout_centerHorizontal="true" |
| 36 | + android:onClick="hide" /> |
| 37 | +</RelativeLayout> |
0 commit comments