출처 : 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코드

 

 

+ Recent posts