[英]SlidingDrawer source
我從此處導入了SlidingDrawer的代碼,並根據attr.xml創建了問題,問題是,在源代碼中仍然存在錯誤,即未定義字段mTop,mBottom,mLeft和mRight。 如何實現SlidingDrawer代碼?
您可能會因為沒有先意識到答案而踢自己
您可以改用吸氣劑
對於mTop,請使用getTop()
對於mBottom,請使用getBottom()
對於mLeft,請使用getLeft()
對於mRight使用getRight()
取消了Drawing Drawer,您可以使用另一個更易於使用的庫:BottomBarDrawer
https://github.com/MartinRajniak/BottomBarDrawer
對於您的錯誤,這是因為您沒有將handle ID(無論按鈕/圖像視圖如何)添加到slidedrawer元素中。 像那樣 :
<SlidingDrawer
android:id="@+id/drawer"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:handle="@+id/handle"
android:content="@+id/content">
<Button
android:id="@id/handle"
android:layout_width="fill_parent"
android:layout_height="50dip"
android:text="ButtonHandler" />
<ListView
android:id="@id/content"
android:layout_width="fill_parent"
android:layout_height="fill_parent" />
</SlidingDrawer>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.