3

I known about use of RecycleView and CardView but i want to create Listview that can work like android L Recent App listview .

You can check from this link .

below is screen shot of android 5.0 recent app list.

Android 5.0 Recent App list UI

Herry
  • 7,037
  • 7
  • 50
  • 80

3 Answers3

1

You can use carousal libraries like

http://code.google.com/p/carousel-layout-android/ which allows creating vertical carausal.

Or atleast you can have idea from the source code.

MohK
  • 1,873
  • 1
  • 18
  • 29
  • I try already try that before asking question and it's crash for VerticalCarouselLayout . – Herry Nov 17 '14 at 13:08
0

As Mohammad Khatri said you can use

http://code.google.com/p/carousel-layout-android/

and change the activity_main.xml to

<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>
user3328051
  • 57
  • 10
0

To complete previous answers (as I cannot comment),

In order to make http://code.google.com/p/carousel-layout-android/ work in vertical mode, you need 2 things :

  • In activity_main.xml, comment the HorizontalCarouselLayout and uncomment VerticalCarouselLayout
  • In MainActivity.java, comment the block dealing with HorizontalCarousel* and uncomment the one dealing with VerticalCarousel*

However, it doesn't work exactly like the recent apps display, since each swipe makes you move only one item in the list (there is no "fling" effect).

Antoine
  • 1,068
  • 10
  • 17