【发布时间】:2015-05-07 14:51:27
【问题描述】:
我想在 ScrollView 下的 Relativelayout 上应用背景图像。 图像出现在 XML 视图上,但未出现在实际设备上。
我在 Ralativelayout 上添加了 ImageView
-
> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/parentView" > <ImageView android:layout_width="fill_parent" android:layout_height="fill_parent" android:src="@drawable/cloudbg" /> <LinearLayout android:layout_width="match_parent" android:orientation="horizontal" android:id="@+id/vo" android:layout_below="@id/relativeLayout" android:layout_marginTop="20dp" android:layout_marginLeft="20dp" android:layout_height="wrap_content"> <TextView android:layout_width="100dp" android:layout_height="wrap_content" android:text="XYZ" /> <TextView android:layout_width="wrap_content" android:layout_marginLeft="25dp" android:layout_height="wrap_content" android:id="@+id/textvo" android:text="Voter Number" /> </LinearLayout> </RelativeLayout> </ScrollView>
谢谢
【问题讨论】:
-
如果你想为相对布局提供图像,请尝试提供背景以避免图像视图
-
你想修复背景?
-
是的,我想修复背景
-
你可以给
background color to your parent layout