我發現了一個Android的bug,給了我很多頭痛。SlidingDrawer旋轉使用onConfigurationChanged
活動的清單:
<activity
android:name=".ActivityTest"
android:configChanges="orientation"
android:label="@string/app_name" />
佈局:
<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="TEST" />
<SlidingDrawer
android:id="@+id/drawer"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:content="@+id/content"
android:handle="@+id/handle"
android:orientation="vertical" >
<ImageView
android:id="@id/handle"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:src="@drawable/ic_launcher" />
<LinearLayout
android:id="@id/content"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:orientation="vertical" >
<Button
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:text="Big Big Button" />
</LinearLayout>
</SlidingDrawer>
現在..抓住抽屜的把手,並將其移動到中間和維護手指在旋轉裝置時...
抽屜尺寸得到所有螺絲...,直到它完全打開。
有人對如何解決它的任何IDEIA?我試圖看看SlidingDrawer的開放代碼,以檢查它打開時爲什麼會變好。但沒有運氣。
不處理我自己的旋轉沒有我從來沒有與滑動抽屜的工作,我很願意選擇加入現在一個選項...
在那裏,做到了。 – neteinstein