Isuru
Isuru

Reputation: 3958

Make First Button fixed on scroll view

I need to first button to be fixed on screen, because it is acts like application logo. I changed ScrollView but then I get errors like "A scroll view can have only one child".

Following is the xml file

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/res/com.apperspray.scarface"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/bg1"
android:orientation="vertical" >

<ScrollView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/scrollview1"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" >

    <LinearLayout
        android:id="@+id/home_layout"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:background="#000000"
        android:orientation="vertical" >

        <Button
            xmlns:android="http://schemas.android.com/apk/res/android"
            android:id="@+id/masthead"
            android:layout_width="fill_parent"
            android:layout_height="80dp"
            android:background="@drawable/mastbg"
            android:gravity="left|center" >
        </Button>

        <Button
            xmlns:android="http://schemas.android.com/apk/res/android"
            android:id="@+id/button01"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="@drawable/buttonbg"
            android:gravity="left|center"
            android:padding="10dp"
            android:shadowColor="#f5f5f5"
            android:shadowDx="1"
            android:shadowDy="1"
            android:shadowRadius="1"
            android:textColor="#6c6c6c"
            android:textSize="10pt" >
        </Button>

        <Button
            xmlns:android="http://schemas.android.com/apk/res/android"
            android:id="@+id/button02"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="@drawable/buttonbg"
            android:gravity="left|center"
            android:padding="10dp"
            android:shadowColor="#f5f5f5"
            android:shadowDx="1"
            android:shadowDy="1"
            android:shadowRadius="1"
            android:textColor="#6c6c6c"
            android:textSize="10pt" >
        </Button>

        <Button
            xmlns:android="http://schemas.android.com/apk/res/android"
            android:id="@+id/button03"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="@drawable/buttonbg"
            android:gravity="left|center"
            android:padding="10dp"
            android:shadowColor="#f5f5f5"
            android:shadowDx="1"
            android:shadowDy="1"
            android:shadowRadius="1"
            android:textColor="#6c6c6c"
            android:textSize="10pt" >
        </Button>

        <Button
            xmlns:android="http://schemas.android.com/apk/res/android"
            android:id="@+id/button04"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="@drawable/buttonbg"
            android:gravity="left|center"
            android:padding="10dp"
            android:shadowColor="#f5f5f5"
            android:shadowDx="1"
            android:shadowDy="1"
            android:shadowRadius="1"
            android:textColor="#6c6c6c"
            android:textSize="10pt" >
        </Button>

        <Button
            xmlns:android="http://schemas.android.com/apk/res/android"
            android:id="@+id/button05"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="@drawable/buttonbg"
            android:gravity="left|center"
            android:padding="10dp"
            android:shadowColor="#f5f5f5"
            android:shadowDx="1"
            android:shadowDy="1"
            android:shadowRadius="1"
            android:textColor="#6c6c6c"
            android:textSize="10pt" >
        </Button>

        <Button
            xmlns:android="http://schemas.android.com/apk/res/android"
            android:id="@+id/button06"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="@drawable/buttonbg"
            android:gravity="left|center"
            android:padding="10dp"
            android:shadowColor="#f5f5f5"
            android:shadowDx="1"
            android:shadowDy="1"
            android:shadowRadius="1"
            android:textColor="#6c6c6c"
            android:textSize="10pt" >
        </Button>

        <Button
            xmlns:android="http://schemas.android.com/apk/res/android"
            android:id="@+id/button07"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="@drawable/buttonbg"
            android:gravity="left|center"
            android:padding="10dp"
            android:shadowColor="#f5f5f5"
            android:shadowDx="1"
            android:shadowDy="1"
            android:shadowRadius="1"
            android:textColor="#6c6c6c"
            android:textSize="10pt" >
        </Button>

        <Button
            xmlns:android="http://schemas.android.com/apk/res/android"
            android:id="@+id/button08"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="@drawable/buttonbg"
            android:gravity="left|center"
            android:padding="10dp"
            android:shadowColor="#f5f5f5"
            android:shadowDx="1"
            android:shadowDy="1"
            android:shadowRadius="1"
            android:textColor="#6c6c6c"
            android:textSize="10pt" >
        </Button>

        <Button
            xmlns:android="http://schemas.android.com/apk/res/android"
            android:id="@+id/button09"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="@drawable/buttonbg"
            android:gravity="left|center"
            android:padding="10dp"
            android:shadowColor="#f5f5f5"
            android:shadowDx="1"
            android:shadowDy="1"
            android:shadowRadius="1"
            android:textColor="#6c6c6c"
            android:textSize="10pt" >
        </Button>

        <Button
            xmlns:android="http://schemas.android.com/apk/res/android"
            android:id="@+id/button10"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="@drawable/buttonbg"
            android:gravity="left|center"
            android:padding="10dp"
            android:shadowColor="#f5f5f5"
            android:shadowDx="1"
            android:shadowDy="1"
            android:shadowRadius="1"
            android:textColor="#6c6c6c"
            android:textSize="10pt" >
        </Button>

        <Button
            xmlns:android="http://schemas.android.com/apk/res/android"
            android:id="@+id/button11"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="@drawable/buttonbg"
            android:gravity="left|center"
            android:padding="10dp"
            android:shadowColor="#f5f5f5"
            android:shadowDx="1"
            android:shadowDy="1"
            android:shadowRadius="1"
            android:textColor="#6c6c6c"
            android:textSize="10pt" >
        </Button>

        <Button
            xmlns:android="http://schemas.android.com/apk/res/android"
            android:id="@+id/button12"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="@drawable/buttonbg"
            android:gravity="left|center"
            android:padding="10dp"
            android:shadowColor="#f5f5f5"
            android:shadowDx="1"
            android:shadowDy="1"
            android:shadowRadius="1"
            android:textColor="#6c6c6c"
            android:textSize="10pt" >
        </Button>

        <Button
            xmlns:android="http://schemas.android.com/apk/res/android"
            android:id="@+id/button13"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="@drawable/buttonbg"
            android:gravity="left|center"
            android:padding="10dp"
            android:shadowColor="#f5f5f5"
            android:shadowDx="1"
            android:shadowDy="1"
            android:shadowRadius="1"
            android:textColor="#6c6c6c"
            android:textSize="10pt" >
        </Button>

        <Button
            xmlns:android="http://schemas.android.com/apk/res/android"
            android:id="@+id/button14"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="@drawable/buttonbg"
            android:gravity="left|center"
            android:padding="10dp"
            android:shadowColor="#f5f5f5"
            android:shadowDx="1"
            android:shadowDy="1"
            android:shadowRadius="1"
            android:textColor="#6c6c6c"
            android:textSize="10pt" >
        </Button>

        <Button
            xmlns:android="http://schemas.android.com/apk/res/android"
            android:id="@+id/button15"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="@drawable/buttonbg"
            android:gravity="left|center"
            android:padding="10dp"
            android:shadowColor="#f5f5f5"
            android:shadowDx="1"
            android:shadowDy="1"
            android:shadowRadius="1"
            android:textColor="#6c6c6c"
            android:textSize="10pt" >
        </Button>

        <Button
            xmlns:android="http://schemas.android.com/apk/res/android"
            android:id="@+id/button16"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="@drawable/buttonbg"
            android:gravity="left|center"
            android:padding="10dp"
            android:shadowColor="#f5f5f5"
            android:shadowDx="1"
            android:shadowDy="1"
            android:shadowRadius="1"
            android:textColor="#6c6c6c"
            android:textSize="10pt" >
        </Button>

        <Button
            xmlns:android="http://schemas.android.com/apk/res/android"
            android:id="@+id/button17"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="@drawable/buttonbg"
            android:gravity="left|center"
            android:padding="10dp"
            android:shadowColor="#f5f5f5"
            android:shadowDx="1"
            android:shadowDy="1"
            android:shadowRadius="1"
            android:textColor="#6c6c6c"
            android:textSize="10pt" >
        </Button>

        <Button
            xmlns:android="http://schemas.android.com/apk/res/android"
            android:id="@+id/button18"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="@drawable/buttonbg"
            android:gravity="left|center"
            android:padding="10dp"
            android:shadowColor="#f5f5f5"
            android:shadowDx="1"
            android:shadowDy="1"
            android:shadowRadius="1"
            android:textColor="#6c6c6c"
            android:textSize="10pt" >
        </Button>

        <Button
            xmlns:android="http://schemas.android.com/apk/res/android"
            android:id="@+id/button19"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="@drawable/buttonbg"
            android:gravity="left|center"
            android:padding="10dp"
            android:shadowColor="#f5f5f5"
            android:shadowDx="1"
            android:shadowDy="1"
            android:shadowRadius="1"
            android:textColor="#6c6c6c"
            android:textSize="10pt" >
        </Button>

        <Button
            xmlns:android="http://schemas.android.com/apk/res/android"
            android:id="@+id/button20"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="@drawable/buttonbg"
            android:gravity="left|center"
            android:padding="10dp"
            android:shadowColor="#f5f5f5"
            android:shadowDx="1"
            android:shadowDy="1"
            android:shadowRadius="1"
            android:textColor="#6c6c6c"
            android:textSize="10pt" >
        </Button>

        <Button
            xmlns:android="http://schemas.android.com/apk/res/android"
            android:id="@+id/button21"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="@drawable/buttonbg"
            android:gravity="left|center"
            android:padding="10dp"
            android:shadowColor="#f5f5f5"
            android:shadowDx="1"
            android:shadowDy="1"
            android:shadowRadius="1"
            android:textColor="#6c6c6c"
            android:textSize="10pt" >
        </Button>

        <Button
            xmlns:android="http://schemas.android.com/apk/res/android"
            android:id="@+id/button22"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="@drawable/buttonbg"
            android:gravity="left|center"
            android:padding="10dp"
            android:shadowColor="#f5f5f5"
            android:shadowDx="1"
            android:shadowDy="1"
            android:shadowRadius="1"
            android:textColor="#6c6c6c"
            android:textSize="10pt" >
        </Button>

        <Button
            xmlns:android="http://schemas.android.com/apk/res/android"
            android:id="@+id/button23"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="@drawable/buttonbg"
            android:gravity="left|center"
            android:padding="10dp"
            android:shadowColor="#f5f5f5"
            android:shadowDx="1"
            android:shadowDy="1"
            android:shadowRadius="1"
            android:textColor="#6c6c6c"
            android:textSize="10pt" >
        </Button>

        <Button
            xmlns:android="http://schemas.android.com/apk/res/android"
            android:id="@+id/button24"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="@drawable/buttonbg"
            android:gravity="left|center"
            android:padding="10dp"
            android:shadowColor="#f5f5f5"
            android:shadowDx="1"
            android:shadowDy="1"
            android:shadowRadius="1"
            android:textColor="#6c6c6c"
            android:textSize="10pt" >
        </Button>

        <Button
            xmlns:android="http://schemas.android.com/apk/res/android"
            android:id="@+id/button25"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:background="@drawable/buttonbg"
            android:gravity="left|center"
            android:padding="10dp"
            android:shadowColor="#f5f5f5"
            android:shadowDx="1"
            android:shadowDy="1"
            android:shadowRadius="1"
            android:textColor="#6c6c6c"
            android:textSize="10pt" >
        </Button>

        <WebView
            android:id="@+id/accesskey"
            android:layout_width="fill_parent"
            android:layout_height="100dp" />
    </LinearLayout>
</ScrollView>

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:ads="http://schemas.android.com/apk/res/com.murdersquirrel.newboard"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_alignBottom="@+id/home_layout"
    android:layout_alignParentBottom="true"
    android:background="#ffffff"
    android:gravity="bottom"
    android:orientation="vertical" >

    <com.google.ads.AdView
        android:id="@+id/adView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        ads:adSize="BANNER"
        ads:adUnitId="a14fb507753fada" />
</LinearLayout>

Button,

<Button
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/masthead"
        android:layout_width="fill_parent"
        android:layout_height="80dp"
        android:background="@drawable/mastbg"
        android:gravity="left|center" >
    </Button>

acts as application logo, so I don't like it to be scroll. I need it to be fixed on top.

Thanks!

Upvotes: 2

Views: 1406

Answers (4)

Raghu Mudem
Raghu Mudem

Reputation: 6963

Design your xml file like this

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/bg1"
android:orientation="vertical">

<Your logout Button/>

<ScrollView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/scrollview1"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent" >

    <LinearLayout
        android:id="@+id/home_layout"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:background="#000000"
        android:orientation="vertical" >
<Your Button/>
<Your Button/>
<Your Button/>
<Your Button/>
...
....
...
<Your Button/>
<Your Button/>


</LinearLayout>
</ScrollView>

<LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:ads="http://schemas.android.com/apk/res/com.murdersquirrel.newboard"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:layout_alignBottom="@+id/home_layout"
    android:layout_alignParentBottom="true"
    android:background="#ffffff"
    android:gravity="bottom"
    android:orientation="vertical" >

    <com.google.ads.AdView
        android:id="@+id/adView"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        ads:adSize="BANNER"
        ads:adUnitId="a14fb507753fada" />
</LinearLayout>

</LinearLayout>

Upvotes: 2

Chintan Raghwani
Chintan Raghwani

Reputation: 3370

jus design your xml as under...

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:ads="http://schemas.android.com/apk/res/com.apperspray.scarface"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/bg1"
android:orientation="vertical" >

<Button
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/masthead"
        android:layout_width="fill_parent"
        android:layout_height="80dp"
        android:background="@drawable/mastbg"
        android:gravity="top"
        android:layout_alignParentTop="true">
    </Button>

<ScrollView
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/scrollview1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_below="@+id/masthead">

<LinearLayout
    android:id="@+id/home_layout"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:background="#000000"
    android:orientation="vertical" >

    <Button
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/button01"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/buttonbg"
        android:gravity="left|center"
        android:padding="10dp"
        android:shadowColor="#f5f5f5"
        android:shadowDx="1"
        android:shadowDy="1"
        android:shadowRadius="1"
        android:textColor="#6c6c6c"
        android:textSize="10pt" >
    </Button>

    <Button
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/button02"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/buttonbg"
        android:gravity="left|center"
        android:padding="10dp"
        android:shadowColor="#f5f5f5"
        android:shadowDx="1"
        android:shadowDy="1"
        android:shadowRadius="1"
        android:textColor="#6c6c6c"
        android:textSize="10pt" >
    </Button>

    <Button
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/button03"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/buttonbg"
        android:gravity="left|center"
        android:padding="10dp"
        android:shadowColor="#f5f5f5"
        android:shadowDx="1"
        android:shadowDy="1"
        android:shadowRadius="1"
        android:textColor="#6c6c6c"
        android:textSize="10pt" >
    </Button>

    <Button
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/button04"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/buttonbg"
        android:gravity="left|center"
        android:padding="10dp"
        android:shadowColor="#f5f5f5"
        android:shadowDx="1"
        android:shadowDy="1"
        android:shadowRadius="1"
        android:textColor="#6c6c6c"
        android:textSize="10pt" >
    </Button>

    <Button
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/button05"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/buttonbg"
        android:gravity="left|center"
        android:padding="10dp"
        android:shadowColor="#f5f5f5"
        android:shadowDx="1"
        android:shadowDy="1"
        android:shadowRadius="1"
        android:textColor="#6c6c6c"
        android:textSize="10pt" >
    </Button>

    <Button
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/button06"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/buttonbg"
        android:gravity="left|center"
        android:padding="10dp"
        android:shadowColor="#f5f5f5"
        android:shadowDx="1"
        android:shadowDy="1"
        android:shadowRadius="1"
        android:textColor="#6c6c6c"
        android:textSize="10pt" >
    </Button>

    <Button
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/button07"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/buttonbg"
        android:gravity="left|center"
        android:padding="10dp"
        android:shadowColor="#f5f5f5"
        android:shadowDx="1"
        android:shadowDy="1"
        android:shadowRadius="1"
        android:textColor="#6c6c6c"
        android:textSize="10pt" >
    </Button>

    <Button
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/button08"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/buttonbg"
        android:gravity="left|center"
        android:padding="10dp"
        android:shadowColor="#f5f5f5"
        android:shadowDx="1"
        android:shadowDy="1"
        android:shadowRadius="1"
        android:textColor="#6c6c6c"
        android:textSize="10pt" >
    </Button>

    <Button
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/button09"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/buttonbg"
        android:gravity="left|center"
        android:padding="10dp"
        android:shadowColor="#f5f5f5"
        android:shadowDx="1"
        android:shadowDy="1"
        android:shadowRadius="1"
        android:textColor="#6c6c6c"
        android:textSize="10pt" >
    </Button>

    <Button
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/button10"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/buttonbg"
        android:gravity="left|center"
        android:padding="10dp"
        android:shadowColor="#f5f5f5"
        android:shadowDx="1"
        android:shadowDy="1"
        android:shadowRadius="1"
        android:textColor="#6c6c6c"
        android:textSize="10pt" >
    </Button>

    <Button
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/button11"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/buttonbg"
        android:gravity="left|center"
        android:padding="10dp"
        android:shadowColor="#f5f5f5"
        android:shadowDx="1"
        android:shadowDy="1"
        android:shadowRadius="1"
        android:textColor="#6c6c6c"
        android:textSize="10pt" >
    </Button>

    <Button
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/button12"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/buttonbg"
        android:gravity="left|center"
        android:padding="10dp"
        android:shadowColor="#f5f5f5"
        android:shadowDx="1"
        android:shadowDy="1"
        android:shadowRadius="1"
        android:textColor="#6c6c6c"
        android:textSize="10pt" >
    </Button>

    <Button
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/button13"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/buttonbg"
        android:gravity="left|center"
        android:padding="10dp"
        android:shadowColor="#f5f5f5"
        android:shadowDx="1"
        android:shadowDy="1"
        android:shadowRadius="1"
        android:textColor="#6c6c6c"
        android:textSize="10pt" >
    </Button>

    <Button
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/button14"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/buttonbg"
        android:gravity="left|center"
        android:padding="10dp"
        android:shadowColor="#f5f5f5"
        android:shadowDx="1"
        android:shadowDy="1"
        android:shadowRadius="1"
        android:textColor="#6c6c6c"
        android:textSize="10pt" >
    </Button>

    <Button
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/button15"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/buttonbg"
        android:gravity="left|center"
        android:padding="10dp"
        android:shadowColor="#f5f5f5"
        android:shadowDx="1"
        android:shadowDy="1"
        android:shadowRadius="1"
        android:textColor="#6c6c6c"
        android:textSize="10pt" >
    </Button>

    <Button
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/button16"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/buttonbg"
        android:gravity="left|center"
        android:padding="10dp"
        android:shadowColor="#f5f5f5"
        android:shadowDx="1"
        android:shadowDy="1"
        android:shadowRadius="1"
        android:textColor="#6c6c6c"
        android:textSize="10pt" >
    </Button>

    <Button
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/button17"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/buttonbg"
        android:gravity="left|center"
        android:padding="10dp"
        android:shadowColor="#f5f5f5"
        android:shadowDx="1"
        android:shadowDy="1"
        android:shadowRadius="1"
        android:textColor="#6c6c6c"
        android:textSize="10pt" >
    </Button>

    <Button
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/button18"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/buttonbg"
        android:gravity="left|center"
        android:padding="10dp"
        android:shadowColor="#f5f5f5"
        android:shadowDx="1"
        android:shadowDy="1"
        android:shadowRadius="1"
        android:textColor="#6c6c6c"
        android:textSize="10pt" >
    </Button>

    <Button
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/button19"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/buttonbg"
        android:gravity="left|center"
        android:padding="10dp"
        android:shadowColor="#f5f5f5"
        android:shadowDx="1"
        android:shadowDy="1"
        android:shadowRadius="1"
        android:textColor="#6c6c6c"
        android:textSize="10pt" >
    </Button>

    <Button
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/button20"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/buttonbg"
        android:gravity="left|center"
        android:padding="10dp"
        android:shadowColor="#f5f5f5"
        android:shadowDx="1"
        android:shadowDy="1"
        android:shadowRadius="1"
        android:textColor="#6c6c6c"
        android:textSize="10pt" >
    </Button>

    <Button
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/button21"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/buttonbg"
        android:gravity="left|center"
        android:padding="10dp"
        android:shadowColor="#f5f5f5"
        android:shadowDx="1"
        android:shadowDy="1"
        android:shadowRadius="1"
        android:textColor="#6c6c6c"
        android:textSize="10pt" >
    </Button>

    <Button
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/button22"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/buttonbg"
        android:gravity="left|center"
        android:padding="10dp"
        android:shadowColor="#f5f5f5"
        android:shadowDx="1"
        android:shadowDy="1"
        android:shadowRadius="1"
        android:textColor="#6c6c6c"
        android:textSize="10pt" >
    </Button>

    <Button
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/button23"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/buttonbg"
        android:gravity="left|center"
        android:padding="10dp"
        android:shadowColor="#f5f5f5"
        android:shadowDx="1"
        android:shadowDy="1"
        android:shadowRadius="1"
        android:textColor="#6c6c6c"
        android:textSize="10pt" >
    </Button>

    <Button
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/button24"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/buttonbg"
        android:gravity="left|center"
        android:padding="10dp"
        android:shadowColor="#f5f5f5"
        android:shadowDx="1"
        android:shadowDy="1"
        android:shadowRadius="1"
        android:textColor="#6c6c6c"
        android:textSize="10pt" >
    </Button>

    <Button
        xmlns:android="http://schemas.android.com/apk/res/android"
        android:id="@+id/button25"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:background="@drawable/buttonbg"
        android:gravity="left|center"
        android:padding="10dp"
        android:shadowColor="#f5f5f5"
        android:shadowDx="1"
        android:shadowDy="1"
        android:shadowRadius="1"
        android:textColor="#6c6c6c"
        android:textSize="10pt" >
    </Button>

    <WebView
        android:id="@+id/accesskey"
        android:layout_width="fill_parent"
        android:layout_height="100dp" />
</LinearLayout>

    <com.google.ads.AdView
    android:id="@+id/adView"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    ads:adSize="BANNER"
    ads:adUnitId="a14fb507753fada" />

Upvotes: 2

AAnkit
AAnkit

Reputation: 27549

Add your button under relative layout or linear layout not under scroll view then.

Upvotes: 1

Thiru VT
Thiru VT

Reputation: 831

Keep the button seperately on FrameLayout and SetScrollview to the elements you need in layout to be scrolled , hope this will work

Upvotes: 1

Related Questions