Using listview to realize timeline effect of Android control
Implementation idea:
The view is implemented through listview. Each listitem is displayed through the content and time of the two fields of the entity
The timeline is assembled using the upper line (20dp), the middle circle (15dp) and the lower line (40dp)
In the listview, set the split line to be empty, and there is no click effect
design sketch:
Step 1: use XML to draw a gray dot (time_cycle. XML)
Step 2: write Java beans
Step 3: write sub layout (time_item. XML)
The effect is shown in the figure below:
Step 4: write the parent layout (activity_main. XML)
Step 5: write the sub layout adapter (kuaidiadapter. Java)
Step 6: set the adapter in the parent layout
The above is the Android control introduced to you by Xiaobian. We use listview to realize the timeline effect. We hope it will be helpful to you. If you have any questions, please leave me a message, and Xiaobian will reply to you in time. Thank you very much for your support for the programming tips website!