Created
April 17, 2016 08:03
-
-
Save karthiks/c1ee47c8ccd7436a87c5bbaeebff7b28 to your computer and use it in GitHub Desktop.
Lesson Learnt playing with RelativeLayout in Android UI
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
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
tools:context="${relativePackage}.${activityClass}" > | |
<ScrollView | |
android:id="@+id/scrollView" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:layout_margin="5dp"> | |
<TextView | |
android:id="@+id/textView" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:text="" /> | |
</ScrollView> | |
<LinearLayout | |
android:id="@+id/buttonsRowLayout" | |
android:layout_height="wrap_content" | |
android:layout_width="match_parent" | |
android:layout_below="@+id/scrollView" | |
android:layout_alignParentBottom="true" | |
android:orientation="horizontal"> | |
<Button | |
android:id="@+id/readTextButton" | |
android:text="@string/read_text" | |
android:layout_height="wrap_content" | |
android:layout_width="0dp" | |
android:layout_weight="1" | |
android:onClick="readTextFile"/> | |
<Button | |
android:id="@+id/readJSONButton" | |
android:text="@string/read_json" | |
android:layout_height="wrap_content" | |
android:layout_width="0dp" | |
android:layout_weight="1" | |
android:onClick="readJSONFile"/> | |
<Button | |
android:id="@+id/readXMLButton" | |
android:text="@string/read_xml" | |
android:layout_height="wrap_content" | |
android:layout_width="0dp" | |
android:layout_weight="1" | |
android:onClick="readXMLFile"/> | |
</LinearLayout> | |
</RelativeLayout> |
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
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
tools:context="${relativePackage}.${activityClass}" > | |
<ScrollView | |
android:id="@+id/scrollView" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:layout_above="@+id/buttonsRowLayout" | |
android:layout_margin="5dp"> | |
<TextView | |
android:id="@+id/textView" | |
android:layout_width="wrap_content" | |
android:layout_height="wrap_content" | |
android:text="" /> | |
</ScrollView> | |
<LinearLayout | |
android:id="@+id/buttonsRowLayout" | |
android:layout_height="wrap_content" | |
android:layout_width="match_parent" | |
android:layout_alignParentBottom="true" | |
android:orientation="horizontal"> | |
<Button | |
android:id="@+id/readTextButton" | |
android:text="@string/read_text" | |
android:layout_height="wrap_content" | |
android:layout_width="0dp" | |
android:layout_weight="1" | |
android:onClick="readTextFile"/> | |
<Button | |
android:id="@+id/readJSONButton" | |
android:text="@string/read_json" | |
android:layout_height="wrap_content" | |
android:layout_width="0dp" | |
android:layout_weight="1" | |
android:onClick="readJSONFile"/> | |
<Button | |
android:id="@+id/readXMLButton" | |
android:text="@string/read_xml" | |
android:layout_height="wrap_content" | |
android:layout_width="0dp" | |
android:layout_weight="1" | |
android:onClick="readXMLFile"/> | |
</LinearLayout> | |
</RelativeLayout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment