Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/221.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 安卓-我可以在webview上建一个晶圆厂吗?_Android - Fatal编程技术网

Android 安卓-我可以在webview上建一个晶圆厂吗?

Android 安卓-我可以在webview上建一个晶圆厂吗?,android,Android,我可以在Android的WebView上建一个FAB吗?我应该能够使用FAB按钮本身调用一次点击方法。以下是您的解决方案: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" android:orientation="vertical" android:layout_width="match_p

我可以在Android的WebView上建一个FAB吗?我应该能够使用FAB按钮本身调用一次点击方法。

以下是您的解决方案:

<?xml version="1.0" encoding="utf-8"?>

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical" android:layout_width="match_parent"
    android:layout_height="match_parent">

<WebView
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:id="@+id/webView" />

<android.support.design.widget.FloatingActionButton
    android:id="@+id/fab"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_gravity="bottom|end"
    android:src="@android:drawable/ic_dialog_email"
    android:layout_marginTop="114dp"
    android:layout_alignParentTop="true"
    android:layout_centerHorizontal="true" />

</RelativeLayout>

是的。。。
//在此处创建web视图布局

将您的webview放在相对布局内,并在webview下方添加FAB

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">

<WebView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/webView" />

<!-- your FAB goes here -->
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:src="@android:drawable/ic_dialog_email"
android:layout_marginTop="114dp"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true" />

</RelativeLayout>

是的,您可以。创建RelativeLayout并将带有webview的FAB放入RelativeLayout中
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical" android:layout_width="match_parent"
android:layout_height="match_parent">

<WebView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/webView" />

<!-- your FAB goes here -->
<android.support.design.widget.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|end"
android:src="@android:drawable/ic_dialog_email"
android:layout_marginTop="114dp"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true" />

</RelativeLayout>