2012-06-12 65 views
0

我試圖利用android-misc-widgets中介紹的面板部件。迄今爲止一直很好。現在問題是滑動面板重疊我的頂部菜單欄。澄清看看下面的截圖。面板部件重疊android中的其他內容

這是當我使用拖放手勢(這裏沒問題)打開面板: enter image description here

這是當我打開面板採用了單一的水龍頭(看圖標重疊頂部菜單): enter image description here

還有一個問題,如果活動內有任何內容,打開面板會將該內容推出屏幕!
enter image description here

回答

0

我設法完成了Relative Layout。將每個項目放在正確的地方。如果有人遇到同樣的問題,這裏是xml文件。

<?xml version="1.0" encoding="utf-8"?> 
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android" 
    xmlns:panel="http://schemas.android.com/apk/res/com.ms.rightel.store" 
    android:layout_width="fill_parent" 
    android:layout_height="match_parent" > 

    <RelativeLayout 
     android:id="@+id/RelativeLayout1" 
     android:layout_width="fill_parent" 
     android:layout_height="fill_parent" 
     android:background="@drawable/bg" > 
    > 


     <ScrollView 
      android:id="@+id/scrollView1" 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:layout_alignParentBottom="true" 
      android:layout_alignParentLeft="true" 
      android:layout_below="@+id/include1" 
      android:layout_marginTop="3dp" > 

      <LinearLayout 
       android:layout_width="match_parent" 
       android:layout_height="match_parent" 
       android:orientation="vertical" > 

       <ImageView 
        android:id="@+id/imageView1" 
        android:layout_width="match_parent" 
        android:layout_height="wrap_content" 
        android:layout_marginTop="10dp" 
        android:src="@drawable/categories" /> 

       <com.devsmart.android.ui.HorizontalListView 
        android:id="@+id/catsHList" 
        android:layout_width="fill_parent" 
        android:layout_height="88dp" > 
       </com.devsmart.android.ui.HorizontalListView> 

       <ImageView 
        android:id="@+id/imageView2" 
        android:layout_width="match_parent" 
        android:layout_height="wrap_content" 
        android:layout_marginTop="10dp" 
        android:src="@drawable/latest" /> 

       <com.devsmart.android.ui.HorizontalListView 
        android:id="@+id/topHList" 
        android:layout_width="fill_parent" 
        android:layout_height="88dp" > 
       </com.devsmart.android.ui.HorizontalListView> 
      </LinearLayout> 
     </ScrollView> 

     <org.miscwidgets.widget.Panel 
      android:id="@+id/panel1" 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:layout_alignParentLeft="true" 
      android:layout_below="@+id/include1" 
      panel:animationDuration="500" 
      panel:closedHandle="@drawable/top_switcher_collapsed_background" 
      panel:content="@+id/panelContent" 
      panel:handle="@+id/panelHandle" 
      panel:linearFlying="false" 
      panel:openedHandle="@drawable/top_switcher_expanded_background" 
      panel:position="top" > 

      <LinearLayout 
       android:id="@+id/panelContent" 
       android:layout_width="match_parent" 
       android:layout_height="fill_parent" 
       android:orientation="vertical" > 

       <ImageView 
        android:layout_width="match_parent" 
        android:layout_height="wrap_content" 
        android:src="@drawable/android_ldpi" /> 

       <ImageView 
        android:layout_width="match_parent" 
        android:layout_height="wrap_content" 
        android:src="@drawable/android_ldpi" /> 
      </LinearLayout> 

      <Button 
       android:id="@+id/panelHandle" 
       android:layout_width="wrap_content" 
       android:layout_height="wrap_content" 
       android:layout_gravity="center_horizontal" /> 
     </org.miscwidgets.widget.Panel> 
<include 
      android:id="@+id/include1" 
      android:layout_width="match_parent" 
      android:layout_height="wrap_content" 
      android:layout_alignParentLeft="true" 
      android:layout_alignParentTop="true" 
      layout="@layout/header" /> 
    </RelativeLayout> 

</FrameLayout>