我正在以编程方式生成一个 webview 我想在 webview 上添加一个按钮。我可以添加一个普通按钮,但它位于 webview 之前,而不是在它之上。
有没有办法在 webview 上添加按钮?
最佳答案
Use like this ...
<FrameLayout
android:layout_width="fill_parent"
android:layout_height="500dp"
android:layout_weight="1"
>
<WebView
android:id="@+id/main_web "
android:layout_width="fill_parent"
android:layout_height="500dp"
android:layout_weight="1" />
<ImageButton
android:id="@+id/refresh"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="right"
></ImageButton>
</FrameLayout>
关于android - 如何在 Android 上向 Webview 添加按钮?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6723070/