1

ListActivity にスライディング ドローを実装したいと考えています。元の問題は、ドロワーが listView の背後で開いていたことです。xml を変更して、ドロワーを 2 番目に描画するようにしました。ドローを思い通りに使用および表示できるようになりましたが、リスト アイテムが表示されません。

どこが間違っているのか誰にも教えてもらえますか?

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


       <ListView 
                android:id="@android:id/list"
               android:layout_width="match_parent"
               android:layout_height="match_parent"
               android:background="#988767"
               android:divider="#00000000"
               android:dividerHeight="10dip"
               android:layout_margin="10dip"
               android:cacheColorHint="#988767"/>

  <SlidingDrawer
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:id="@+id/drawer"
      android:handle="@+id/handle"
      android:content="@+id/content"
      >
  <ImageView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:id="@+id/handle"
      android:src="@drawable/arrowup"
      />
  <RelativeLayout
      android:background="#000000"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:orientation="vertical"
      android:id="@+id/content">
  <TextView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:text="This is some text"
      android:id="@+id/txt"/>
  </RelativeLayout>

  </SlidingDrawer>


</RelativeLayout>
4

2 に答える 2

1

android:layout_alignParentBottom="true" android:layout_centerHorizontal="true"スライド引き出しにセット

于 2011-11-18T07:16:41.077 に答える
0

FrameLayoutを使用すると、リストビューの上にSlidingDrawerを表示できます。次のリンク は、FrameLayoutに関する記事です。

于 2011-06-15T10:27:30.937 に答える