tags:

views:

29

answers:

1

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.

A: 

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.

CommonsWare
thanks for u response, i followed the way u given,but i can't get the view what i needed,for example if if i have blue colour background during my scrolling i need the background not to cahnge,instead to visible content scrolling alone,and i have web view where it's background being white has static from page itself while loading,but i need it to be same background ,how to change override the background of webview...i hope u may guide to get my need.thanks.
MGSenthil
@MGSenthil: You can't change the background of a `WebView` AFAIK.
CommonsWare
ok...y it so like that...?
MGSenthil