2016-06-26 5 views
0

FloatingActionButton은 음악이 앱에서 재생되지 않을 때까지 잘 작동합니다.이 library을 사용하고 있습니다.음악 재생시 보이지 않는 FloatingActionButton - SlideupPanelLayout

문제는 내가 팹 버튼을 클릭하여 음악을 재생할 때 잘

작업 전에 안드로이드 6.0에서오고, 그리고 팹 버튼이 보이지 않는가는 슬라이드 패널을 이동하기 시작합니다.

문제 - :

1- Slideup 애니메이션 slideup 레이아웃 드래그 잘 작동하지 않는 작동을 중지.

2- Fab 버튼이 보이지 않습니다.

중요한 것은 음악이 재생되지 않을 때까지 모든 것이 잘 작동한다는 것입니다.

음악을 재생할 때 배경 서비스를 사용하고 있습니다.

메모리 문제 또는 다른 문제가 있습니까? 라이브러리의 문제 목록 here

<com.sothree.slidinguppanel.FloatingActionButtonLayout 
    xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:tools="http://schemas.android.com/tools" 
    xmlns:app="http://schemas.android.com/apk/res-auto" 
    xmlns:sothree="http://schemas.android.com/apk/res-auto" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    sothree:umanoFabMode="circular_reveal"> 
    <com.sothree.slidinguppanel.SlidingUpPanelLayout 
     xmlns:sothree="http://schemas.android.com/apk/res-auto" 
     android:id="@+id/sliding_layout" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:gravity="bottom" 
     sothree:umanoAnchorPoint="@+id/handle" 
     sothree:umanoPanelHeight="58dp" 
     sothree:umanoShadowHeight="4dp" 
     sothree:umanoParallaxOffset="100dp" 
     sothree:umanoDragView="@+id/trackdetails" 
     sothree:umanoOverlay="true" 
     sothree:umanoScrollableView="@+id/now_playlist"> 
     <android.support.v4.widget.DrawerLayout 
      xmlns:android="http://schemas.android.com/apk/res/android" 
      xmlns:tools="http://schemas.android.com/tools" 
      xmlns:app="http://schemas.android.com/apk/res-auto" 
      android:id="@+id/drawer" 
      android:layout_width="match_parent" 
      android:layout_height="match_parent" 
      android:fitsSystemWindows="true" 
      tools:context="com.ultimo.musicplayer.activity.MainActivity"> 
     <android.support.design.widget.CoordinatorLayout 
      android:layout_width="match_parent" 
      android:layout_height="match_parent"> 
      <!--Main Content goes here--> 
      <android.support.v4.view.ViewPager 
       android:id="@+id/viewpager" 
       android:layout_width="match_parent" 
       android:layout_height="match_parent" 
       app:layout_behavior="@string/appbar_scrolling_view_behavior" /> 
      <!--Toolbar and tabs--> 
      <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:popupTheme="@style/PopupMenu" 
        android:layout_height="wrap_content" 
        android:layout_width="match_parent" 
        app:popupTheme="@style/ThemeOverlay.AppCompat.Light" 
        app:layout_scrollFlags="scroll|enterAlways"/> 
       <android.support.design.widget.TabLayout 
        android:id="@+id/tab_layout" 
        android:layout_height="wrap_content" 
        android:layout_width="match_parent" 
        app:tabGravity="fill" 
        sothree:tabIndicatorHeight="3dp" 
        app:tabMode="scrollable" 
        app:layout_scrollFlags="scroll|enterAlways"/> 
      </android.support.design.widget.AppBarLayout> 

     </android.support.design.widget.CoordinatorLayout> 
      <android.support.design.widget.NavigationView 
       android:id="@+id/navigation_view" 
       android:layout_width="wrap_content" 
       android:layout_height="match_parent" 
       android:layout_gravity="start" 
       app:menu="@menu/drawer"/> 
     </android.support.v4.widget.DrawerLayout> 
     <include layout="@layout/mediaplayer_layout"/> 
    </com.sothree.slidinguppanel.SlidingUpPanelLayout> 
    <android.support.design.widget.FloatingActionButton 
     android:id="@+id/fab_play" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_gravity="bottom|end" 
     android:src="@drawable/play" 
     android:clickable="true"/> 
</com.sothree.slidinguppanel.FloatingActionButtonLayout> 

이미 게시 질문 -

다음은 활동 레이아웃입니다.

+0

SlidingUpPanel 레이아웃에는 하위보기가 두 개만 있어야하므로이를 수정해야합니다. –

+0

두 개의 하위 항목 만 있습니다. – Vijay

답변

0

내가 만든 레이아웃에 문제가 있다고 생각합니다. 또한 UmanoSlidingPanelLayout을 사용하여 MusicPlayer를 만듭니다.

시도해보십시오.

<android.support.v4.widget.DrawerLayout 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/drawer" 
android:layout_width="match_parent" 
android:layout_height="match_parent" 
android:fitsSystemWindows="true" 
tools:openDrawer="start" 
tools:context="com.ultimo.musicplayer.activity.MainActivity"> 

<com.sothree.slidinguppanel.FloatingActionButtonLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:app="http://schemas.android.com/apk/res-auto" 
    xmlns:sothree="http://schemas.android.com/apk/res-auto" 
    xmlns:tools="http://schemas.android.com/tools" 
    android:layout_width="match_parent" 
    android:layout_height="match_parent" 
    sothree:umanoFabMode="circular_reveal"> 

    <com.sothree.slidinguppanel.SlidingUpPanelLayout xmlns:sothree="http://schemas.android.com/apk/res-auto" 
     android:id="@+id/sliding_layout" 
     android:layout_width="match_parent" 
     android:layout_height="match_parent" 
     android:gravity="bottom" 
     sothree:umanoAnchorPoint="@+id/handle" 
     sothree:umanoDragView="@+id/trackdetails" 
     sothree:umanoOverlay="true" 
     sothree:umanoPanelHeight="58dp" 
     sothree:umanoParallaxOffset="100dp" 
     sothree:umanoScrollableView="@+id/now_playlist" 
     sothree:umanoShadowHeight="4dp"> 

     <android.support.design.widget.CoordinatorLayout 
      android:layout_width="match_parent" 
      android:layout_height="match_parent"> 
      <!--Main Content goes here--> 
      <android.support.v4.view.ViewPager 
       android:id="@+id/viewpager" 
       android:layout_width="match_parent" 
       android:layout_height="match_parent" 
       app:layout_behavior="@string/appbar_scrolling_view_behavior" /> 
      <!--Toolbar and tabs--> 
      <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="wrap_content" 
        android:popupTheme="@style/PopupMenu" 
        app:layout_scrollFlags="scroll|enterAlways" 
        app:popupTheme="@style/ThemeOverlay.AppCompat.Light" /> 

       <android.support.design.widget.TabLayout 
        android:id="@+id/tab_layout" 
        android:layout_width="match_parent" 
        android:layout_height="wrap_content" 
        app:layout_scrollFlags="scroll|enterAlways" 
        app:tabGravity="fill" 
        app:tabMode="scrollable" 
        sothree:tabIndicatorHeight="3dp" /> 
      </android.support.design.widget.AppBarLayout> 

     </android.support.design.widget.CoordinatorLayout> 

     <include layout="@layout/mediaplayer_layout" /> 
    </com.sothree.slidinguppanel.SlidingUpPanelLayout> 

    <android.support.design.widget.FloatingActionButton 
     android:id="@+id/fab_play" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:layout_gravity="bottom|end" 
     android:clickable="true" 
     android:src="@drawable/play" /> 
</com.sothree.slidinguppanel.FloatingActionButtonLayout> 

<android.support.design.widget.NavigationView 
    android:id="@+id/navigation_view" 
    android:layout_width="wrap_content" 
    android:layout_height="match_parent" 
    android:layout_gravity="start" 
    app:menu="@menu/drawer" /> 

</android.support.v4.widget.DrawerLayout> 
+0

레이아웃을 렌더링 할 때 안드로이드 6.0의 몇 가지 문제로 인해 이전에 같은 레이아웃을 사용하고있었습니다. – Vijay