Created
November 7, 2015 17:19
-
-
Save lifeparticle/bd4095c5c705f1477be5 to your computer and use it in GitHub Desktop.
apply layout_weight in a xml object so that it will have 20% of height and 80% of width
This file contains 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
/** | |
* Author S Mahbub-Uz Zaman on November 8, 2015 | |
* Lisence Under GPL2 | |
*/ | |
<?xml version="1.0" encoding="utf-8"?> | |
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:orientation="vertical" | |
android:weightSum="100"> | |
<LinearLayout | |
android:layout_width="match_parent" | |
android:layout_height="0dp" | |
android:layout_weight="20" | |
android:orientation="horizontal" | |
android:weightSum="100"> | |
<LinearLayout | |
android:layout_width="0dp" | |
android:layout_height="match_parent" | |
android:layout_weight="90" | |
android:background="@color/topic_bg"> | |
<TextView | |
android:id="@+id/text" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
android:layout_gravity="left" | |
android:padding="5dp" | |
android:text="dffsdfdf" | |
android:textColor="@android:color/white" | |
android:textSize="17sp" | |
android:textStyle="bold" /> | |
</LinearLayout> | |
</LinearLayout> | |
</LinearLayout> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment