【发布时间】:2014-02-13 22:49:10
【问题描述】:
这是我的HorizontalScrollViewXML
<HorizontalScrollView
android:id="@+id/horizontalScrollView1"
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="19" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="horizontal" >
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/card_background" >
</RelativeLayout>
</LinearLayout>
</HorizontalScrollView>
我想设置RelativeLayout的宽度等于HorizontalScrollView的宽度。我怎样才能用 XML 做到这一点(不是以编程方式)
【问题讨论】:
-
设置RelativeLayout父LinearLayout宽度为match_parent...
标签: android xml layout scrollview horizontalscrollview