【发布时间】:2014-11-17 12:11:25
【问题描述】:
我知道 RecycleView 和 CardView 的使用,但我想创建可以像 android L Recent App listview 一样工作的 Listview。
你可以从这个link查看。
下面是android 5.0最近应用列表的屏幕截图。
【问题讨论】:
标签: android listview material-design android-recents
我知道 RecycleView 和 CardView 的使用,但我想创建可以像 android L Recent App listview 一样工作的 Listview。
你可以从这个link查看。
下面是android 5.0最近应用列表的屏幕截图。
【问题讨论】:
标签: android listview material-design android-recents
【讨论】:
正如 Mohammad Khatri 所说,您可以使用
http://code.google.com/p/carousel-layout-android/
并将activity_main.xml 更改为
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity"
android:background="@android:color/darker_gray">
<!-- <com.touchmenotapps.carousel.simple.HorizontalCarouselLayout
android:id="@+id/carousel_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"/> -->
<com.touchmenotapps.carousel.simple.VerticalCarouselLayout
android:id="@+id/carousel_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
</RelativeLayout>
【讨论】:
要完成之前的答案(因为我无法评论),
为了让http://code.google.com/p/carousel-layout-android/ 在垂直模式下工作,你需要两件事:
但是,它的工作方式与最近显示的应用程序不太一样,因为每次滑动只会让您移动列表中的一项(没有“甩动”效果)。
【讨论】: