[英]Android How to make sliding menu?
檢查 github 中發布的此代碼: https://github.com/umano/AndroidSlidingUpPanel 。
您可以在滑動菜單中設計自己的視圖。
<com.sothree.slidinguppaneldemo.SlidingUpPanelLayout
android:id="@+id/sliding_layout"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:text="My Content"
android:textSize="16sp" />
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center|top"
android:text="Another Content"
android:textSize="16sp" />
</com.sothree.slidinguppaneldemo.SlidingUpPanelLayout>
最簡單的方法是使用像https://github.com/umano/AndroidSlidingUpPanel這樣的庫
但是自從谷歌發布了CoordinatorLayout和Behavior 之后,我建議你看一看,雖然它有點新,而且很難做到。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.