Last active
December 15, 2015 22:09
-
-
Save leonguyen/5331192 to your computer and use it in GitHub Desktop.
Android Lab: Scroll View - Defining an XML Layout
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?> | |
| <ScrollView xmlns:android="http://schemas.android.com/apk/res/android" | |
| android:layout_width="match_parent" | |
| android:layout_height="match_parent" | |
| android:fillViewport="true" > | |
| <LinearLayout | |
| android:layout_width="match_parent" | |
| android:layout_height="match_parent" | |
| android:orientation="vertical" > | |
| <LinearLayout | |
| android:id="@+id/header" | |
| android:layout_width="fill_parent" | |
| android:layout_height="70dp" | |
| android:background="#53BDFF" | |
| android:paddingBottom="5dp" | |
| android:paddingTop="5dp" > | |
| <ImageView | |
| android:layout_width="wrap_content" | |
| android:layout_height="wrap_content" | |
| android:layout_marginLeft="10dp" | |
| android:src="@drawable/ic_launcher" /> | |
| <TextView | |
| android:layout_width="fill_parent" | |
| android:layout_height="wrap_content" | |
| android:layout_centerHorizontal="true" | |
| android:layout_gravity="center" | |
| android:text="Header" /> | |
| </LinearLayout> | |
| <LinearLayout | |
| android:layout_width="fill_parent" | |
| android:layout_height="fill_parent" | |
| android:layout_below="@id/header" | |
| android:layout_weight="1" | |
| android:padding="10dp" > | |
| <TextView | |
| android:layout_width="fill_parent" | |
| android:layout_height="wrap_content" | |
| android:text="Content" /> | |
| </LinearLayout> | |
| <LinearLayout | |
| android:id="@+id/footer" | |
| android:layout_width="fill_parent" | |
| android:layout_height="90dip" | |
| android:layout_alignParentBottom="true" | |
| android:background="#53BDFF" > | |
| <TextView | |
| android:layout_width="fill_parent" | |
| android:layout_height="wrap_content" | |
| android:layout_gravity="center" | |
| android:text="Footer" /> | |
| </LinearLayout> | |
| </LinearLayout> | |
| </ScrollView> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment