脚本宝典收集整理的这篇文章主要介绍了Android 用 SlidingUpPanelLayout 实现 Google Music 豆瓣FM 等可拖动滑动面板,脚本宝典觉得挺不错的,现在分享给大家,也给大家做个参考。
SlidingUpPanelLayout 这个库好像是基于官方的 SlidingPaneLayout 修改而来的
compile 'com.sothree.slidinguppanel:library:+'
首先是布局
<com.sothree.slidinguppanel.SlidingUpPanelLayout >"http://schemas.andROId.COM/apk/res/android"
>"http://schemas.android.com/apk/res-auto"
android:id="@+id/sliding_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravITy="bottom"
sothree:panelHeight="68dp"
sothree:initialstate="expanded"
sothree:shadowHeight="4dp">
<FrameLayout
android:id="@+id/frameLayout_main"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<FrameLayout
android:id="@+id/frameLayout_up"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</com.sothree.slidinguppanel.SlidingUpPanelLayout>
然后再把这两个 FrameLayout replace 上 Fragment 就可以用啦
transaction.replace(R.id.frameLayout_main, fMListFragment);
transaction.replace(R.id.frameLayout_up, playerFragment);
以上是脚本宝典为你收集整理的Android 用 SlidingUpPanelLayout 实现 Google Music 豆瓣FM 等可拖动滑动面板全部内容,希望文章能够帮你解决Android 用 SlidingUpPanelLayout 实现 Google Music 豆瓣FM 等可拖动滑动面板所遇到的问题。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。