Android:上/下动画滑动菜单

Alp*_*kin 5 animation android menu view sliding

我尝试了几种解决方案,但需要帮助。以下主题非常有用,但我认为我做错了。如何设置两者的布局高度/设置?假设我有2个LinearLayout用于内容和底部菜单。

我也不希望底部菜单在滑动后消失。它应该在那里恒定。我正在为菜单单击/更改视图使用片段。

Android:展开/折叠动画

Android动画下拉/上视图正确

在此处输入图片说明

Waz*_*_Be 3

由于我的评论似乎有帮助,我将发布链接作为答案: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)