Layout_weight does not work properly
<p>I have the followin xml where I want imageview and then two textview and then imageview again, but it does not work properly.</p><p>Here is what I planned to have:</p><p><a href="http://ift.tt/1WFogD5" rel="nofollow"><img src="http://ift.tt/1WFogD5" alt="enter image description here" /></a></p><p>Here is what I am getting:</p><p><a href="http://ift.tt/1OrGHoJ" rel="nofollow"><img src="http://ift.tt/1OrGHoJ" alt="enter image description here" /></a></p><pre><br /><code><LinearLayout<br /> android:layout_width="match_parent"<br /> android:layout_height="match_parent"<br /> android:layout_gravity="center_horizontal"<br /> android:orientation="horizontal"<br /> android:clickable="true"<br /> android:onClick="userProfileDetailAction"<br /> android:id="@+id/userProfileDetail"<br /> android:paddingTop="5dp"<br /> android:paddingBottom="5dp"><br /><br /> <com.example.eyeniaras.satdostum.CircleImageView<br /> xmlns:app="http://ift.tt/GEGVYd"<br /> android:layout_weight="0.3"<br /> android:layout_width="0dp"<br /> android:layout_height="wrap_content"<br /> android:background="@drawable/circle_shape"<br /> app:civ_border_width="0.2dp"<br /> app:civ_border_color="@color/dark"<br /> android:id="@+id/userImage"<br /> android:scaleType="centerCrop"/><br /><br /> <LinearLayout<br /> android:orientation="vertical"<br /> android:layout_width="0dp"<br /> android:layout_height="match_parent"<br /> android:layout_weight="0.6"><br /><br /> <TextView<br /> android:id="@+id/userName"<br /> android:layout_width="wrap_content"<br /> android:layout_height="0dp"<br /> android:layout_gravity="center"<br /> android:textColor="@android:color/black"<br /> android:background="#ffffff"<br /> android:textSize="18sp"<br /> android:layout_weight="1"/><br /><br /> <TextView<br /> android:id="@+id/userRegistrationDate"<br /> android:layout_width="wrap_content"<br /> android:layout_height="0dp"<br /> android:layout_gravity="center"<br /> android:textColor="@android:color/black"<br /> android:background="#ffffff"<br /> android:textSize="18sp"<br /> android:text = "45 days ago"<br /> android:layout_weight="1"/><br /> </LinearLayout><br /><br /> <ImageView<br /> android:id="@+id/userClick"<br /> android:layout_width="0dp"<br /> android:layout_height="wrap_content"<br /> android:layout_gravity="center_vertical"<br /> android:layout_weight="0.1"<br /> android:background="@drawable/list_arrow" /><br /><br /> </LinearLayout><br /></code><br /></pre><br /><h2>Click here view more answers <a href="http://ift.tt/1UjAJ0n">http://ift.tt/1UjAJ0n</a></h2>
Nhận xét
Đăng nhận xét