How to create a Listview like a list of recent Android apps android L

I knew about using RecycleView and CardView, but I want to create a Listview that can work like a list view of Android apps in Android.

You can check this link.

Below is a screenshot of the recent Android 5.0 app listing.

Android 5.0 Recent App list UI

+3


source to share


3 answers


You can use carousel libraries like

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



Or at least you can have an idea from source.

+1


source


As Mohammad Khatri said, you can use

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



and change the activity_main.xml file 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>

      

0


source


To follow up on the previous answers (as I cannot comment),

To make http://code.google.com/p/carousel-layout-android/ work vertically, you need 2 things:

  • In Activity_main.xml, comment out the HorizontalCarouselLayout and uncomment the VerticalCarouselLayout
  • In MainActivity.java, comment out the block related to HorizontalCarousel * and uncomment the one related to VerticalCarousel *

However, it does not work exactly the same as when displaying recent apps, as each swipe only forces you to move one item in the list (there is no "fling" effect).

0


source







All Articles