建立播放音乐的界面界面、音乐

由网友(╰ 笑看人生)分享简介:我试图建立和接口,将模仿最近谷歌播放音乐接口,它作为一个提醒看起来像这样在手机上I'm trying to build and interface that would mimic the recent Google Play Music interface which as a reminder looks lik...

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

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的易于使用。 添加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

阅读全文

相关推荐

最新文章