简体   繁体   English

android中的Coverflow设计

[英]Coverflow design in android

我一直在尝试为我的应用程序使用Coverflow功能,任何人都可以建议一个好的链接或示例代码来学习在android中设计一个Coverflow,我搜索了很多,但dint找到了一个好的。

Here's a good one. 这是一个很好的。 You'll can modify it to suit your needs: 您可以根据自己的需要进行修改:

https://code.google.com/p/android-coverflow/ https://code.google.com/p/android-coverflow/

Here is a nice video which may help you- 这是一个很好的视频,可以帮助你 -

http://youtu.be/V67cMYjvzo8 http://youtu.be/V67cMYjvzo8

To access the coverflow view just use: Coverflow coverflow = (Coverflow)findViewById(R.id.cover_flow) 要访问封面视图,只需使用:Coverflow coverflow =(Coverflow)findViewById(R.id.cover_flow)

The XML Layout- XML布局 -

Create a LinearLayout with the orientation set to vertical and set that as your content view. 创建一个方向设置为vertical的LinearLayout,并将其设置为内容视图。 Then add the Cover flow view and the list view to the layout. 然后将Cover flow视图和列表视图添加到布局中。

If you do it in a layout xml it would be something like this (change the "com.example.package" to the pckage where your CoverFlow is located): 如果你在布局xml中执行它会是这样的(将“com.example.package”更改为CoverFlow所在的pckage):

<com.example.package.CoverFlow
    android:id="@+id/cover_flow"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content" />


<ListView
    android:id="@+id/list"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content" />

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM