2012-07-04 20 views
0

當我將滑動窗口小部件添加到我的佈局時,遇到了一個路障。我添加了它,一切正常。問題是,當我的佈局已經填滿高度時,滑動抽屜的把手不再可見。有沒有辦法通過將手柄置於前景或使用另一種方式來實現這一點來使手柄可見?如何使android的滑動抽屜在前景中可見?

,我有玩的例子是:

https://mobibear.wordpress.com/2010/07/12/android-slidingdrawer-with-custom-view/

所有我從上面的網站編輯是下面的.xml文件。謝謝你的時間提前,我會站在....

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

    <TextView 
     android:id="@+id/textView1" 
     android:layout_width="fill_parent" 
     android:layout_height="wrap_content" 
     android:text="Blah Blah Title" 
     android:gravity="center" 
     android:textSize="38dp"/> 

    <FrameLayout 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" > 

    </FrameLayout> 

    <SlidingDrawer xmlns:android="http://schemas.android.com/apk/res/android" 
     android:id="@+id/drawer" 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" 
     android:handle="@+id/handle" 
     android:content="@+id/content"> 

     <bear.exmaple.CustomView 
      android:id="@+id/content" 
      android:layout_width="fill_parent" 
      android:layout_height="fill_parent"> 
     </bear.exmaple.CustomView> 


     <ImageView android:id="@id/handle" 
      android:layout_width="wrap_content" 
      android:layout_height="wrap_content" 
      android:src="@drawable/tray_handle_normal" /> 

    </SlidingDrawer> 

</LinearLayout> 

回答