如何在android中设置静态布局的背景
朋友的 我有视图要单独显示内容,必须在布局视图中滚动。如何单独滚动内容而不是整个布局 这里是我的内容详细信息布局代码如何在android中设置静态布局的背景,android,Android,朋友的 我有视图要单独显示内容,必须在布局视图中滚动。如何单独滚动内容而不是整个布局 这里是我的内容详细信息布局代码 <?xml version="1.0" encoding="utf-8"?> 如何为整个视图设置静态背景, 提前谢谢 如何为整个视图设置静态背景 使用android:background。或者,将ScrollView放在FrameLayout中,让FrameLayout的早期子对象作为您的背景。感谢您的回复,我按照您给出的方式进行操作,但我无法获得所需
<?xml version="1.0" encoding="utf-8"?>
如何为整个视图设置静态背景,
提前谢谢
如何为整个视图设置静态背景
使用
android:background
。或者,将ScrollView
放在FrameLayout
中,让FrameLayout
的早期子对象作为您的背景。感谢您的回复,我按照您给出的方式进行操作,但我无法获得所需的视图,例如,如果我在滚动过程中有蓝色背景,我需要背景,而不是背景,我有一个网页视图,它的背景是白色的,在加载时网页本身是静态的,但我需要它是相同的背景,如何更改和覆盖网页视图的背景…我希望你能指导我满足我的需要。谢谢。@MGSenthil:你不能更改webview
AFAIK的背景。
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:background="@color/blueback"
android:layout_width="fill_parent" android:layout_height="fill_parent">
<ImageView android:layout_width="fill_parent" android:layout_height="300dip"
android:id="@+id/img1" android:adjustViewBounds="true" android:padding="15dip"/>
<View android:layout_width="310dip" android:layout_height="1dip" android:layout_centerInParent="true" android:paddingRight="5dip"
android:background="@color/orange" android:layout_below="@id/img1" />
<TextView android:id="@+id/text1" android:layout_below="@id/img1"
android:textSize="15sp"
android:textStyle="bold"
android:textColor="@color/black"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="20dip"
android:paddingTop="3dip"
android:gravity="top" />
<TextView android:id="@+id/text2" android:layout_below="@id/text1"
android:textSize="12sp"
android:textColor="@color/black"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="20dip"
android:paddingTop="2dip"
android:gravity="top" />
<View android:layout_width="310dip" android:layout_height="1dip" android:layout_centerInParent="true" android:paddingRight="5dip"
android:id="@+id/desc" android:background="@color/orange" android:layout_below="@id/text2" />
<WebView android:id="@+id/text3" android:layout_below="@id/desc"
android:textSize="12sp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="20dip"
android:paddingTop="10dip" />
</RelativeLayout>
</ScrollView>