我需要STRETCH时的背景图像在我的应用程序布局,Android的布局图像填充宽度
请注意,在我的布局的黄色背景不streched
如何完成这[黄色条形图填充父项]?
还请注意,蓝色的布局不是整个屏幕的宽度,怎么样?
代码:
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="8dp"
android:paddingRight="8dp"
android:id="@+id/myfragment">
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_weight="1"
android:background="#0000FF">
android:id="@+id/imageView1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:src="@drawable/titlebar" />
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1"
android:drawSelectorOnTop="false"/>
非常感谢!
2012-07-20
MaKo