我已經創建了一個頁面應用程序,其中浮動操作按鈕用於共享頁面中的內容。它完美地運行在android棒棒糖,但是當我在kitkat上運行該應用程序時,它不顯示。由於唯一的交互組件是FAB,因此用戶只能盯着看。我跑了一些搜索,發現FAB應該在kitkat上完美運行,並且只有在棒棒糖(如填充)時纔會出現一些問題。但是,它在棒棒糖中工作得很好。我是否必須將它更改爲棒棒糖之前版本的按鈕?我的第一個問題。任何幫助表示讚賞。謝謝。浮動操作按鈕不會出現在kitkat中
<?xml version="1.0" encoding="utf-8"?>
<android.support.design.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true"
tools:context="com.ataraxianstudios.decksharer.MainActivity"
>
<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:layout_margin="@dimen/fab_margin"
android:src="@drawable/share1"/>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#016cb4">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:id="@+id/llMain"
>
<Spinner
android:id="@+id/osversions"
android:layout_width="220dp"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
/>
<ImageView
android:layout_width="60dp"
android:layout_height="80dp"
android:id="@+id/selectedImage"
/>
</LinearLayout>
</ScrollView>
</android.support.design.widget.CoordinatorLayout>
檢查[this](http://stackoverflow.com/a/31753179/4790490)out – Hearty