Я пытаюсь реализовать SwipeRefreshLayout для плавающей кнопки и scrollview с тремя таблицами. Я хочу показать Floating Button все время на экране (например, в приложении Gmail с Material Design). К сожалению, обновление прокрутки блокирует прокрутку. Как сообщить об обновлении салфетки, чтобы моя прокрутка просмотрела прокрутку вверх? Должен ли я изменить структуру раскладки?SwipeRefresh с ScrollView и FloatingActionButton
Я использую библиотеку https://github.com/futuresimple/android-floating-action-button
Вот мой макет:
<android.support.v4.widget.SwipeRefreshLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:fab="http://schemas.android.com/apk/res-auto"
android:id="@+id/swipe_container"
android:layout_width="match_parent"
android:layout_height="match_parent">
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<ScrollView
android:id="@+id/scroll_recent"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TableLayout
android:id="@+id/table_recent_claims"
android:layout_width="match_parent"
android:layout_height="wrap_content"></TableLayout>
<TableLayout
android:id="@+id/table_recent_rapidscans"
android:layout_width="match_parent"
android:layout_height="wrap_content"></TableLayout>
<TableLayout
android:id="@+id/table_recent_journeys"
android:layout_width="match_parent"
android:layout_height="wrap_content"></TableLayout>
</LinearLayout>
</ScrollView>
<com.getbase.floatingactionbutton.FloatingActionButton
android:id="@+id/fab"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|right"
fab:fab_icon="@drawable/fab_plus24" />
</FrameLayout>
</android.support.v4.widget.SwipeRefreshLayout>