Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

SOLVED: Android layout_weight is not working

Raza Khan:

I'm trying to set android:layout_weight="1" but it does not do anything.



xmlns:app="http://ift.tt/GEGVYd"
xmlns:tools="http://ift.tt/LrGmb4"
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="match_parent"
android:background="#fbd0d5"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:context="com.example.raza.helloworld.MainActivity"
tools:showIn="@layout/activity_main"
android:weightSum="1">



android:id="@+id/textView1"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="#fef65b"
android:text="Minnions"
android:textColor="#f44242"
android:textSize="60sp"
android:textStyle="bold" />


android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="#fef65b"
android:text="Happy"
android:textColor="#f44242"
android:textSize="60sp"
android:textStyle="bold" />


android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1"
android:background="#fef65b"
android:text="Birthday"
android:textColor="#f44242"
android:textSize="60sp"
android:textStyle="bold" />


What's wrong with this code?



Posted in S.E.F
via StackOverflow & StackExchange Atomic Web Robots
This Question have been answered
HERE


This post first appeared on Stack Solved, please read the originial post: here

Share the post

SOLVED: Android layout_weight is not working

×

Subscribe to Stack Solved

Get updates delivered right to your inbox!

Thank you for your subscription

×