我目前的xml代码:
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
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>
我希望实现以下目标:
// parent width matches device width
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ this + + +
+ block + this fit parent remain width + this block +
+ fixed + this block weighted 70% + weighted 30% +
+ 30dp + + +
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
一个视图具有固定宽度,然后其他视图应使用加权来填充保持宽度
任何想法?谷歌搜索但似乎没有类似的问题