Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to put button on webview

Tags:

android

layout

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

like image 756
Sunil Kumar Sahoo Avatar asked Feb 12 '26 20:02

Sunil Kumar Sahoo


1 Answers

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 
>
like image 74
Sunil Kumar Sahoo Avatar answered Feb 15 '26 12:02

Sunil Kumar Sahoo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!