我有一个图像视图:
<ImageView
android:id="@+id/oyna"
android:src="@drawable/oyna"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>在这之后,我有一个可滑动的抽屉:
<SlidingDrawer
android:id="@+id/slidingDrawer1"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:content="@+id/content"
android:topOffset="50dip" >我想点击图像视图,打开我把图像视图的id作为句柄的slidingdrawer.When,就会出现exception.What,我能做什么?
发布于 2012-03-14 06:46:13
这对我很管用
<SlidingDrawer
android:id="@+id/slidingDrawer1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:content="@+id/content"
android:handle="@+id/handle" >
<!-- set the id of the imageview to be handle -->
<ImageView
android:id="@+id/handle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/icon" />
<LinearLayout
android:id="@+id/content"
android:layout_width="match_parent"
android:layout_height="match_parent" >
</LinearLayout>
</SlidingDrawer>https://stackoverflow.com/questions/9690621
复制相似问题