2012-06-22 1 views
0

나는 처음으로 slidingdrawer로 작업 중이며 왜 숨겨진 상태인지 아니면 최악의 상태로 표시되는지 알지 못합니다. 나는 단서가 없다. 이 슬라이더를 사용하여 버튼 클릭 불려SlidingDrawer가 Scrollview 뒤에 숨어 있음

<?xml version="1.0" encoding="utf-8"?> 
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    android:id="@+id/scrllvwNo1" 
    android:layout_width="fill_parent" 
    android:layout_height="fill_parent" 
    android:background="#F1F3F2" 
    android:orientation="vertical" > 

    <LinearLayout 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:background="#BDBEC0" 
     android:orientation="vertical" > 

     <LinearLayout 
      android:layout_width="fill_parent" 
      android:layout_height="60dp" 
      android:layout_gravity="center_vertical|center_horizontal" 
      android:layout_marginBottom="15dp" 
      android:background="@drawable/titlebar" 
      android:gravity="center_vertical|center_horizontal|center" 
      android:orientation="horizontal" 
      android:paddingLeft="10dp" 
      android:paddingRight="10dp" > 

      <Button 
       android:id="@+id/cancelButton" 
       style="@style/ButtonText" 
       android:layout_width="0dp" 
       android:layout_height="40dp" 
       android:layout_gravity="right|center_vertical" 
       android:layout_weight="1" 
       android:background="@drawable/button" 
       android:text="@string/cancelButton" > 
      </Button> 

      <TextView 
       android:layout_width="0dp" 
       android:layout_height="wrap_content" 
       android:layout_gravity="center_vertical|center_horizontal" 
       android:layout_weight="2" 
       android:gravity="center_vertical|center_horizontal|center" 
       android:text="@string/Terms" 
       android:textColor="#fff" 
       android:textSize="23sp" /> 

      <Button 
       android:id="@+id/agreeButton" 
       style="@style/ButtonText" 
       android:layout_width="0dp" 
       android:layout_height="40dp" 
       android:layout_gravity="right|center_vertical" 
       android:layout_weight="1" 
       android:background="@drawable/button" 
       android:text="@string/agreeButton" > 
      </Button> 
     </LinearLayout> 
     </LinearLayout> 

     <ScrollView 
      android:id="@+id/SCROLLER_ID" 
      android:layout_width="fill_parent" 
      android:layout_height="wrap_content" 
      android:background="#F1F3F2" 
      android:fillViewport="true" 
      android:padding="15dp" 
      android:paddingBottom="20dp" 
      android:scrollbars="vertical" > 

      <TextView 
       android:layout_width="fill_parent" 
       android:layout_height="wrap_content" 
       android:layout_marginLeft="15dp" 
       android:layout_marginRight="15dp" 
       android:layout_marginTop="20dp" 
       android:text="@string/termsText" 
       android:textColor="#595B5A" 
       android:textSize="14sp" /> 
     </ScrollView> 
    <SlidingDrawer 
     android:id="@+id/SlidingDrawer" 
     android:layout_width="wrap_content" 
     android:layout_height="wrap_content" 
     android:content="@+id/contentLayout" 
     android:handle="@+id/slideHandleButton" 
     android:background="#00000000" 
     android:padding="10dip" 
     android:topOffset="-50dp" > 

     <Button 
      android:id="@+id/slideHandleButton" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:background="#00000000" > 
     </Button> 

     <LinearLayout 
      android:id="@+id/contentLayout" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:background="@drawable/titlebar" 
      android:gravity="center|top" 
      android:orientation="vertical" 
      android:padding="22dip" > 

      <TextView 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:layout_marginBottom="20dp" 
       android:layout_marginTop="20dp" 
       android:text="@string/emailValidateConfirmationText" 
       android:textColor="#fff" 
       android:textSize="14sp" /> 

      <Button 
       android:id="@+id/okButtonCreateAccount" 
       style="@style/ButtonText" 
       android:layout_width="90dp" 
       android:layout_height="wrap_content" 
       android:background="@drawable/button" 
       android:text="@string/ok" > 
      </Button> 
     </LinearLayout> 
    </SlidingDrawer> 
</LinearLayout> 

: 내 코드에서

slider.animateOpen(); 

여기 내 XML 코드입니다. 나는 또한 슬라이더를 스태킹했습니다.

SlidingDrawer slider = (SlidingDrawer) findViewById(R.id.SlidingDrawer); 

답변

0

슬라이더 버튼의 배경을 완전히 투명색 인 검은 색 (보이지 않음) 인 # 00000000으로 설정했습니다. # FF000000 또는 # F000을 사용해보십시오.