Reputation: 629
friend's I have view to show the content alone have to scroll in the view on the layout.how to scroll the content alone not the whole layout.
Here my layout code for content details.
<?xml version="1.0" encoding="utf-8"?>
<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>
how can set static background for whole view , thanks in advance.
Upvotes: 0
Views: 1462
Reputation: 1007624
how can set static background for whole view
Use android:background
. Or, put the ScrollView
in a FrameLayout
, and have an earlier child of the FrameLayout
be your background.
Upvotes: 1