Android开发中使用RecyclerView怎么实现一个时光轴效果

  

Android开发中使用RecyclerView怎么实现一个时光轴效果?相信很多没有经验的人对此束手无策,为此本文总结了问题出现的原因和解决方法,通过这篇文章希望你能解决这个问题。

如图:

,  Android开发中使用RecyclerView怎么实现一个时光轴效果”>,,,,,,</p> <p> activity_main。xml </p> <pre类= & lt;及# 63;xml version=?.0”;编码=皍tf-8", # 63;比;   http://schemas.android.com/apk/res/android" & lt; RelativeLayout xmlns: android=?;   xmlns:工具=癶ttp://schemas.android.com/tools"   android: layout_width=癿atch_parent"   android: layout_height=癿atch_parent"   工具:上下文=?MainActivity"比;      & lt; android.support.v7.widget.RecyclerView   android: id=癅 + id/recyclerView"   android: layout_width=癿atch_parent"   android: layout_height=癿atch_parent"   android: overScrollMode=皀ever"/比;      & lt;/RelativeLayout>

项目。xml

& lt;及# 63;xml version=?.0”;编码=皍tf-8", # 63;比;   http://schemas.android.com/apk/res/android" & lt; RelativeLayout xmlns: android=?;   xmlns:应用=癶ttp://schemas.android.com/apk/res-auto"   android: layout_width=癿atch_parent"   android: layout_height=皐rap_content"   android: paddingLeft=? dp"   android: paddingRight=? dp"   android: paddingTop=? dp"比;   & lt; TextView   android: id=癅 + id/item_timeline_time"   android: layout_height=皐rap_content"   android: layout_width=皐rap_content"   android: layout_marginRight=? dp"   android: layout_marginTop=?8 dp"   android:重力=癱enter_horizontal"   android:填充=? dp"   输入textColor=癮ndroid: @color/colorAccent"   android: textSize=?6 sp"   android:文本=?015-06-08 \ n09:56"/比;      & lt;使用   android: id=癅 + id/item_timeline_icon_layout"   android: layout_width=?8 dp"   android: layout_height=?8 dp"   android: layout_marginBottom=? dp"   android: layout_marginRight=? dp"   android: layout_toRightOf=癅 id/item_timeline_time"比;      & lt; com.timelinedemo.CircleImageView   android: id=癅 + id/item_timeline_icon_bg"   android: layout_width=癿atch_parent"   android: layout_height=癿atch_parent"   android: src=https://www.yisu.com/zixun/盄android:颜色/透明”   应用:civ_border_width=" 4 dp "/>                           <视图   android: id=癅 + id/item_timeline_view”   android: layout_width=" 2 dp "   android: layout_height=" 60 dp "   android: layout_alignLeft=" @ id/item_timeline_icon_layout”   android: layout_below=" @ id/item_timeline_icon_layout”   android: layout_marginLeft=" 23 dp "   android:背景=" @color/colorAccent "/>   

活动。Java

公共类MainActivity延伸AppCompatActivity {      私人RecyclerView RecyclerView;      @Override   保护空白>看完上述内容,你们掌握Android开发中使用RecyclerView怎么实现一个时光轴效果的方法了吗?如果还想学到更多技能或想了解更多相关内容,欢迎关注行业资讯频道,感谢各位的阅读!

Android开发中使用RecyclerView怎么实现一个时光轴效果