Android base control--listview for timeline effects

Source: Internet
Author: User

ListView Implementation Timeline Effect

Implementation ideas:

The view is implemented through the ListView, displaying each listitem through the content and time of the entity two field contents

The timeline is assembled using the above line (20DP) and the middle of a circle (15DP) and the following line (40DP)

In the ListView, set its split line to empty, and no click Effect

Step one: Use XML to draw a gray dot (time_cycle.xml)

Step two: The writing of JavaBean

Step three: Write a sub-layout (time_item.xml)

Its effect


Step four: Write the parent layout (activity_main.xml)

Step Five: Write the sub-layout adapter (Kuaidiadapter.java)


Step Six: Set up the adapter in the parent layout


SOURCE Download: We recommend importing using Import module

Android base control--listview for timeline effects

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.