2012-07-26 1 views
0

slidingdrawer로 작업하면서 응용 프로그램의 모든 활동에 대해 slidingdrawer를 표시 할 수있었습니다.slidingdrawer가 열려있을 때 비활성화 된 배경

내가 직면 한 문제는 여전히 배경 (활동의보기)을 클릭 할 수 있다는 것입니다. slidingdrawer가 열려있을 때 백그라운드를 비활성화 할 수있는 방법이 있습니까?

안부

EDIT 1

<?xml version="1.0" encoding="utf-8"?> 
<SlidingDrawer xmlns:android="http://schemas.android.com/apk/res/android" 
    android:id="@+id/slidingDrawer1" 
    android:layout_width="match_parent" 
    android:layout_height="wrap_content" 
    android:layout_marginLeft="20dp" 
    android:layout_marginRight="20dp" 
    android:content="@+id/content" 
    android:handle="@+id/handle" > 

    <Button 
     android:id="@+id/handle" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:text="Handle" /> 

    <LinearLayout 
     android:id="@+id/content" 
     style="@style/roundrectbox_white_layout" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:background="@drawable/slider_round_rect_border" 
     android:orientation="vertical" 
     android:padding="15dp" > 

     <ListView 
      android:id="@+id/listView1" 
      android:layout_width="fill_parent" 
      android:layout_height="match_parent" 
      android:cacheColorHint="@android:color/transparent" 
      android:divider="@android:color/transparent" 
      android:listSelector="@android:color/transparent" /> 
    </LinearLayout> 

</SlidingDrawer> 
+0

슬라이딩 서랍의 내용으로 추가 한 내용 ?? – AkashG

+0

그 목록보기. – Deva

+0

슬라이딩 서랍을 드래그하면 목록보기를 볼 수 있습니까 ?? – AkashG

답변

0

이 시도 :

<?xml version="1.0" encoding="utf-8"?> 
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" > 

    <TextView 
     android:id="@+id/text" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:text="@string/hello"/> 

    <SlidingDrawer 
     android:id="@+id/drawer" 
     android:layout_width="320dp" 
     android:layout_height="440dp" 
     android:content="@+id/content" 
     android:handle="@+id/handle" 
     android:orientation="vertical" > 

     <Button 
      android:id="@+id/handle" 
      android:layout_width="fill_parent" 
      android:layout_height="20dp" 
      android:background="@drawable/wood" /> 

     <RelativeLayout 
      android:id="@+id/content" 
      android:layout_width="fill_parent" 
      android:layout_height="fill_parent" 
      > 

       <ListView 
        android:id="@+id/list" 
        android:layout_width="fill_parent" 
        android:layout_height="wrap_content"></ListView> 
     </RelativeLayout> 
    </SlidingDrawer> 

</RelativeLayout> 

활동하여 : 배열

ListView listView=(ListView) findViewById(R.id.list); 
     ArrayAdapter<String> adapter=new ArrayAdapter<String>(getApplicationContext(), android.R.layout.simple_list_item_1,array); 
     listView.setAdapter(adapter); 

이다

여기서

,536,
String[] array={"1","2","3","4"};