0
I have been trying to run this code but getting this error since last 1 week.

请帮忙!我已经声明了布局:宽度。尝试在滑动抽屉中使用 layout.width 并用 dip 替换 dp 但仍然遇到相同的错误。

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

       <SlidingDrawer
           android:id="@+id/drawer"
           android:width="320dp"
           android:height="440dp"
           android:orientation="vertical"
           android:content="@+id/content"
           android:handle="@+id/handle">

           <ImageView 
               android:id="@+id/handle"
               android:layout_width="48dp"
               android:layout_height="48dp"
               android:src="@drawable/ic_launcher"/>

           <AnalogClock 
               android:id="@+id/content"
               android:background="#D0A0A0"
               android:layout_width="fill_parent"
               android:layout_height="fill_parent"/>
       </SlidingDrawer>
        </RelativeLayout>
4

1 回答 1

1

我相信布局标签是强制性标签。您还没有提供 layout_width 和 layout_height 给您的SlidingDrawer

android:layout_width="fill_parent"
android:layout_height="fill_parent"
于 2012-08-04T06:12:08.230 回答