私のプロジェクトの1つは、共通の動作クラスを使用して完全なファクトボタンを表示/非表示にしています。今、いくつかのレイアウト要件の変更には、スクロール上のショーファブは動作していません。FloatingActionButtonは、FrameLayout内のRecyclerViewで問題を認識します
CoordinatorLayoutの設定は標準で、そこにフラグメントを読み込むViewPagerが含まれています。フラグメントレイアウトの変更により、ファブショーの動作が正しく機能しなくなりました。ここで
は、元の作業フラグメントレイアウトです:
<SwipeRefreshLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RecyclerView
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/filterMenu"
android:clipToPadding="false" />
</SwipeRefreshLayout>
ここでは動作しません新しいフラグメントレイアウトです:
<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:id="@+id/emptyStateView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:translationY="@dimen/home_empty_state_y_offset">
<ImageView
android:id="@+id/emptyStateImage"
android:layout_width="wrap_content"
android:layout_height="160dp"
android:layout_centerInParent="true"
android:src="@drawable/home_empty_state_animation" />
</RelativeLayout>
<SwipeRefreshLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<RecyclerView
android:id="@+id/list"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/filterMenu"
android:clipToPadding="false" />
</SwipeRefreshLayout>
</FrameLayout>
それはのように思えます追加されたFrameLayoutがこれらの問題を引き起こしていますが、理由は分かりません。これは設計上の問題ですか?または私は何かを逃している?
クレイジーな問題...これを共有してくれてありがとう! –