4

Ich baue einen Musik-Player. Ich arbeite mit bottomsheet. Es funktioniert gut und es hat seine Spitzenhöhe, aber es deckt den RecyclerView letzten Artikel. Wie kann ich recyclerView über BottomSheet anzeigen. Bitte helfen Sie mir.Wie man den letzten Eintrag über bottomsheeet hält

Hier ist meine 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> 

Bitte legen nahe, was zu tun ist.

Antwort

4

Fügen Sie diese zwei Eigenschaften in Ihrem recyclerView hinzu.

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

Seine Arbeit. Danke Kumpel :) –

+0

es funktioniert aber manchmal klemmte es und verhalten sich nicht entsprechend .. warum? –

+0

Was ist das Problem, mit dem Sie genau konfrontiert sind? – Masum

Verwandte Themen