1
予加載偏好篩選具有以下佈置:按鈕經過在ICS和果凍豆(API一十六分之十五)一個偏好的ListView
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/export_main_frame"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="?android:attr/windowBackground"
android:clickable="true">
<ImageView
android:id="@+id/export_background"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@string/entry_background" />
<android.support.v7.widget.RecyclerView
android:id="@+id/export_settings_list"
android:scrollbars="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"/>
<android.support.design.widget.FloatingActionButton
android:id="@+id/export_fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="@dimen/fab_margin"
android:src="@drawable/ic_file_upload_white_24"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"
android:layout_alignParentBottom="true"
android:clickable="true"/>
</RelativeLayout>
的RecyclerView是其中一個XML文件的偏好被充氣列表。佈局的其餘部分,FAB和ImageView,只是添加了自定義首選項屏幕。
所有這些在最新的Android版本上都能很好地工作,但在ICS和Jelly Bean上(我沒有嘗試Kikat),FloatingActionButton無法獲得任何點擊並變得有點透明。
我嘗試了十幾種不同的東西(使用標準按鈕,標準lisview等),但該按鈕在屏幕上仍然無用,下面的列表項總是被點擊。
我認爲這個問題可能來自於我膨脹XML偏好文件的事實,因爲我使用標準列表創建了相同的佈局,並且該按鈕在任何版本中運行良好。
最壞的情況,我將只需要加載一個具體佈局爲舊版本...