由于我的评论似乎有帮助,我将发布链接作为答案:https://github.com/umano/AndroidSlidingUpPanel
完整的代码无法粘贴到 StackOverflow 中,但整个库将帮助您实现您所需要的。
Umano Android 应用程序的 2.2 版本为当前播放的文章提供了一个性感的向上滑动可拖动面板。这种类型的面板是 Google Music 应用和 Rdio 应用中也使用的常见模式。这是该组件的开源实现,您可以在应用程序中自由利用。Umano 团队 <3 开源。
<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="Main Content"
android:textSize="16sp" />
<TextView
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center|top"
android:text="The Awesome Sliding Up Panel"
android:textSize="16sp" />
</com.sothree.slidinguppaneldemo.SlidingUpPanelLayout>
Run Code Online (Sandbox Code Playgroud)