2014-10-03 4 views
0

안녕하세요, 안드로이드 애플 리케이션에 슬라이딩 서랍 오버레이를 구현하려고합니다.메뉴 서랍 구현 android

https://github.com/SimonVT/android-menudrawer

을 내 활동 메뉴 서랍을 구현 :이 링크에서 참조를 촬영했다. 그래서 내 활동에는 TitlePageIndicator가있는 viewPager에 2 개의 단편이 있습니다. 조각에서 버튼을 클릭하면 메뉴 서랍이 열립니다. 현재 서랍은 titlePageIndicator도 오버레이합니다. viewPager의 제목 아래에 열거 나 덮어 씌우는 메뉴 서랍을 구현하고 싶습니다. 아니면 그렇게 불가능한 것입니까? 도와 주셔서 감사합니다! 당신이 XML을 아래로 사용할 수 있습니다

답변

0

, 당신은 당신의 제목 표시 줄 아래에 레이아웃을 정의하고 그것을 위해 그 설정해야합니다 :이 하나 라이브러리를 지원해야합니다

<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android" 
xmlns:app="http://schemas.android.com/apk/res/com.mhp.chek" 
android:id="@+id/drawer_layout" 
android:layout_width="match_parent" 
android:layout_height="match_parent" > 

<!-- main layout --> 
<LinearLayout 
    android:id="@+id/base_layout" 
    android:layout_width="match_parent" 
    android:layout_height="fill_parent" 
    android:layout_gravity="end" 
    android:orientation="vertical" > 

    <!-- for example your **viewpager** can define here --> 

</LinearLayout> 

<!-- drawer layout--> 

<LinearLayout 
    android:id="@+id/drawer" 
    android:layout_width="300dp" 
    android:layout_height="fill_parent" 
    android:layout_gravity="end" 
    android:orientation="vertical" > 

</LinearLayout> 

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

메모를.

+0

Tks 많이! 잘 했어! – user2893564