부동 Button 용 SwipeRefreshLayout 및 세 가지 TableLayouts가있는 scrollview를 구현하려고합니다. 머티리얼 디자인을 사용하는 Gmail 앱과 같이 항상 플로팅 버튼을 화면에 표시하고 싶습니다. 안타깝게도 스 와이프 새로 고침은 스크롤 업을 차단합니다. 내 scrollview가 위로 스크롤하려는 스 와이프 새로 고침을 알리는 방법은 무엇입니까? 레이아웃 구조를 변경해야합니까? 당신은 당신의 SwipeRefreshLayout
에 대한 프로그래밍 canChildScrollUp()
메소드를 오버라이드 (override) 할 필요가ScrollView 및 FloatingActionButton을 사용하여 SwipeRefresh
<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>