«   2025/01   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
Tags
more
Archives
Today
Total
관리 메뉴

올해는 머신러닝이다.

[펌][안드로이드]SlidingDrawer 왼쪽에서 오른쪽으로 left to right 본문

Android/Tip&Tech

[펌][안드로이드]SlidingDrawer 왼쪽에서 오른쪽으로 left to right

행복한 수지아빠 2014. 1. 14. 11:39

출처 : http://javaexpert.tistory.com/179#comment9420256

 

 기본적으로 SlidingDrawer 는 오른쪽에서 왼쪽으로 밖에 지원이 안되는가?? --

 

왼쪽에서 밀면훨씬편한데.. ㅋㅋ

 

<SlidingDrawer xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/slidingDrawer"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:orientation="horizontal"
    android:gravity="center_horizontal"
    android:handle="@+id/handle"
    android:content="@+id/content"
    android:rotation="180">
    <LinearLayout android:id="@+id/handle"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content">
        <ImageView android:id="@+id/imageView"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:src="@drawable/ic_launcher"
            android:rotation="180" />
    </LinearLayout>
    <ImageView android:id="@+id/content"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:background="#FF0000"
        android:src="@drawable/ic_launcher"
        android:rotation="180" />
</SlidingDrawer>

 

 

이것이 xml 코드

 

 

public void onCreate(Bundle savedInstanceState){

super.onCreate(savedInstanceState);

requestWindowFeature(Window.FEATURE_NO_TITLE);

setContentView(R.layout.subware);

drawer = (SlidingDrawer)findViewById(R.id.slidingDrawer);

drawer.setOnDrawerScrollListener(new SlidingDrawer.OnDrawerScrollListener() {

@Override

public void onScrollStarted() {

// TODO Auto-generated method stub

}

@Override

public void onScrollEnded() {

// TODO Auto-generated method stub

}

});

 

drawer.setOnDrawerCloseListener(new SlidingDrawer.OnDrawerCloseListener() {

@Override

public void onDrawerClosed() {

// TODO Auto-generated method stub

}

});

drawer.setOnDrawerOpenListener(new SlidingDrawer.OnDrawerOpenListener() {

@Override

public void onDrawerOpened() {

// TODO Auto-generated method stub

}

});

}

요건 java코드