2016-07-18 7 views
2

사이 (yavski 라이브러리) 팹 메뉴를 배치하고 난 그냥 this 문제처럼 레이아웃이 사이에 배치하려고하는 방법 :안드로이드 - 내가 yavski <a href="https://github.com/yavski/fab-speed-dial" rel="nofollow noreferrer">library</a>에서 부동 작업 메뉴를 사용하고 2 개 레이아웃

을하지만 할 때 yavski 라이브러리의 fab 메뉴로 작업했는데 작동하지 않았습니다 ...

어떻게해야합니까?

내가 헤더와 "cardview"(link) 사이의 버튼을 추가 해요

편집 할 수 있습니다. 나는이 아래로 밀어 내가 팹에 대한 기본 라이브러리를 사용

enter image description here

, 그것은 잘 작동 (버튼 사라지고 나타날 때 슬라이드까지). 나는 특별한 하나를 사용하는 경우, 그것은 시작은 좋아 보인다에서,하지만 난 사라지는 대신, 아래로 슬라이드하면 ... 너무

enter image description here

아래로 슬라이드 그리고 마지막 문제는 버튼이 때

enter image description here

답변

0

...이 위쪽으로 약간 이동, 클릭

나는이 특별한을 사용하지 말아 "간단한 라이브러리는 + ... 함께 FAB 결혼" 라이브러리에서 언급 한 라이브러리를 사용하지만 기본 동작을 사용하면 예상 한 프로젝트를 만든 사람도 잘 작동해야합니다.

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

       <LinearLayout 
        android:layout_width="match_parent" 
        android:layout_height="match_parent" 
        android:orientation="vertical" 
        android:background="@color/white"> 

        //Content 

       </LinearLayout> 

       <android.support.design.widget.FloatingActionButton 
        android:id="@+id/fab" 
        android:layout_width="wrap_content" 
        android:layout_height="wrap_content" 
        android:layout_margin="16dp" 
        android:clickable="true" 
        android:onClick="process" 
        android:src="@drawable/ic_add" 
        app:layout_anchor="@id/ANCHOR_VIEW" 
        app:layout_anchorGravity="bottom|right|end" 
        app:backgroundTint="@color/accent"/> 

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

github 프로젝트의 문제 섹션을 사용해야합니다. https://github.com/yavski/fab-speed-dial/issues – XxGoliathusxX