1

我想在我的 ListActivity 中实现滑动绘制。最初的问题是抽屉在 listView 后面打开。我已经更改了 xml,所以它第二次绘制抽屉。我现在可以随意使用和查看平局,但我没有看到任何列表项。

谁能告诉我哪里出错了?

<?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 回答