How to put button on webview

2019-07-21 08:28发布

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

1条回答
叼着烟拽天下
2楼-- · 2019-07-21 08:49

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 
>
查看更多
登录 后发表回答