建立播放音乐的界面 [英] Build Play Music-like interface

查看:139
本文介绍了建立播放音乐的界面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图建立和接口,将模仿最近谷歌播放音乐接口,它作为一个提醒看起来像这样在手机上

I'm trying to build and interface that would mimic the recent Google Play Music interface which as a reminder looks like this on a phone

我已经拿到了 DrawerLayout 和标签正确的,但我不知道如何建立惊人的底部片段显示当前正在播放的歌曲。它混合了两个特点:

I've already got the DrawerLayout and the Tabs right, but I have no idea how to build the amazing bottom fragment that displays the currently playing song. It mixes two features:

  • 如果你刷卡此片段到左侧时,将通过下一首歌曲代替。我认为这是可以做到相当快使用 ViewPager 及新片段为每首歌曲,但它是一个有效的办法做到这一点?
  • 如果你刷它,它会打开一种含播放器本身(见上述第二和第三截图)抽屉。我怎样才能让我的应用程序中类似的东西?我找不到任何提及这个文档里面,所以我想这不是真正的官员。
  • If you swipe this fragment to the left, it will be replaced by the next song. i think it can be done fairly quickly using a ViewPager and a new Fragmentfor each song, but is it an efficient way to do it?
  • If you swipe it up, it will open kind of a drawer containing the player itself (see the above second and third screenshots). How can I get something similar inside my application? I can't find any mention of this inside the docs so I guess it's not really official.

推荐答案

  • 使用 AndroidSlidingUpPanel 库。这是pretty的易于使用。
  • 添加<一个href="http://developer.android.com/reference/android/support/v4/app/FragmentPagerAdapter.html">FragmentPager这里面面板的刷卡留给下一首歌曲功能。它也可以是处理为向上滑动面板。
  • 添加球员布局向上滑动面板布局内

  • Use AndroidSlidingUpPanel library. It is pretty easy to use.
  • Add a FragmentPager inside this panel for the "Swipe left for the next song" feature. It also can be the "handle" for sliding up panel.
  • Add the player layout inside the sliding up panel layout
  • 这篇关于建立播放音乐的界面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆