Sunil Kumar Sahoo
Sunil Kumar Sahoo

Reputation: 53657

How to put button on webview

I want in background I will show an webview. and on that webview on foreground i want to place another button. How to achieve the same. I can load the googlemap using map view. but unable to place a button on it. I am showing google map in an mapview.

enter image description here

Thanks

Upvotes: 3

Views: 1115

Answers (1)

Sunil Kumar Sahoo
Sunil Kumar Sahoo

Reputation: 53657

Thank you all. I got the solution by using Framelayout.

<FrameLayout 

        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_below="@+id/header"
        android:layout_above="@+id/footer">
        <WebView
            android:id="@+id/GD_webview"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:layout_above="@+id/footer" />

            <Button
            android:layout_centerVertical="true"
            android:id="@+id/setTimeBtn"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:layout_width="wrap_content"
            android:background="@drawable/settime"
            android:layout_gravity="bottom"
            android:layout_marginBottom="15dip"></Button>
    </FrameLayout 
>

Upvotes: 2

Related Questions