my currently xml code:
<LinearLayout xmlns:android="http://ift.tt/nIICcg"
android:id="@+id/mlistview_row"
android:layout_width="match_parent"
android:layout_height="34dp"
android:weightSum="1"
android:padding="8dp">
<View
android:layout_width="30dp"
android:layout_height="match_parent"/>
<TextView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.7"
android:textSize="19sp"/>
<ImageView
android:layout_width="0dp"
android:layout_height="match_parent"
android:layout_weight="0.3"/>
</LinearLayout>
I want to achieve something like:
// parent width matches device width
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ this + + +
+ block + this fit parent remain width + this block +
+ fixed + this block weighted 70% + weighted 30% +
+ 30dp + + +
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
one view has fixed width, then other view should use weighting to fill remain width
any ideas? googled but seems no similar question
No comments:
Post a Comment