4

私は音楽プレーヤーを構築しています。私はbottomsheetと働いています。そのうまく動作し、それは一見の高さを持っていますが、それはRecyclerViewの最後の項目をカバーしています。 recyclerViewを上に設定する方法BottomSheetビュー。 私を助けてください。ここで最後の項目を上に保持する方法

は何をすべきかを提案してください私のMainActivityのXML

<?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:id="@+id/tab_root" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    android:background="@color/white"> 

    <android.support.design.widget.AppBarLayout 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content"> 

     <android.support.v7.widget.Toolbar 
      android:id="@+id/toolbar" 
      android:layout_width="match_parent" 
      android:layout_height="?attr/actionBarSize" 
      android:background="@color/colorPrimary" 
      /> 

     <android.support.design.widget.TabLayout 
      android:id="@+id/tab_layout" 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:background="@color/orange" 
      app:tabIndicatorColor="@color/colorAccent" 
      app:tabIndicatorHeight="3dp" 
      app:tabMode="fixed" 
      app:tabTextColor="@color/white" /> 
    </android.support.design.widget.AppBarLayout> 
    <android.support.v4.view.ViewPager 
     android:id="@+id/pager" 
     android:layout_width="match_parent" 
     android:layout_height="wrap_content" 
     app:layout_behavior="@string/appbar_scrolling_view_behavior" /> 

    <!-- View useed to load other fragments so that my Bottomsheet can be seen above other fragments --> 
    <FrameLayout 
     android:id="@+id/fragment_container" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     /> 
    <!-- BottomSheet layout--> 
    <FrameLayout 
     android:id="@+id/framelayouts" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:elevation="8dp" 
     android:clickable="true" 
     app:layout_behavior="android.support.design.widget.BottomSheetBehavior"> 

     <include layout="@layout/layout_player_bottomsheet" /> 
    </FrameLayout> 
</android.support.design.widget.CoordinatorLayout> 

です。

答えて

4

この2つのプロパティをrecyclerViewに追加します。

android:clipToPadding="false" 
android:paddingBottom="60dp" 
+0

その作業。ありがとうbuddy :) –

+0

その作業が、時にはそれはスタックし、それに応じて動作しません..なぜですか? –

+0

あなたは正確に直面している問題は何ですか? – Masum

関連する問題