New UI controls for Android L: simple use of Recyclerview CardView

Source: Internet
Author: User

SOURCE Download: Https://github.com/qyxxjd/RecyclerViewDemo

Recyclerview:

    • Recyclerview to replace the ListView for better performance and easier use
    • The control is a large collection of views that can be loaded, and can be efficiently recycled and scrolled, using the Recyclerview control when the elements in your list are constantly changing dynamically
    • The Convertview is reused in the Viewholder,listview, and in Recyclerview, the Viewholder is used as the unit of the cache.
    • Layout Manager (Recyclerview.setlayoutmanager) is provided for each entry location
    • Action Animation for each entry (Recyclerview.setitemanimator)
    • Do not provide Setonitemclicklistener, setonitemlongclicklistener methods, we need to implement our own

CardView:

    • Card view components, inherited from the Framelayout class
    • It is easy to set the shadows and fillets

    • CardView is a layout, so you can include other view

Vertical layout

Horizontal layout grid Waterfall Stream multiple item

New UI controls for Android L: simple use of Recyclerview CardView

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.