欧美一级特黄大片做受成人-亚洲成人一区二区电影-激情熟女一区二区三区-日韩专区欧美专区国产专区

Android開發(fā)中使用RecyclerView怎么實現(xiàn)一個時光軸效果

Android開發(fā)中使用RecyclerView怎么實現(xiàn)一個時光軸效果?相信很多沒有經(jīng)驗的人對此束手無策,為此本文總結(jié)了問題出現(xiàn)的原因和解決方法,通過這篇文章希望你能解決這個問題。

成都創(chuàng)新互聯(lián)公司專業(yè)為企業(yè)提供伊金霍洛網(wǎng)站建設(shè)、伊金霍洛做網(wǎng)站、伊金霍洛網(wǎng)站設(shè)計、伊金霍洛網(wǎng)站制作等企業(yè)網(wǎng)站建設(shè)、網(wǎng)頁設(shè)計與制作、伊金霍洛企業(yè)網(wǎng)站模板建站服務(wù),十多年伊金霍洛做網(wǎng)站經(jīng)驗,不只是建網(wǎng)站,更提供有價值的思路和整體網(wǎng)絡(luò)服務(wù)。

如圖:

 Android開發(fā)中使用RecyclerView怎么實現(xiàn)一個時光軸效果      

activity_main.xml

<&#63;xml version="1.0" encoding="utf-8"&#63;>
<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.support.v7.widget.RecyclerView
    android:id="@+id/recyclerView"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:overScrollMode="never" />

</RelativeLayout>

item.xml

<&#63;xml version="1.0" encoding="utf-8"&#63;>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:app="http://schemas.android.com/apk/res-auto"
  android:layout_width="match_parent"
  android:layout_height="wrap_content"
  android:paddingLeft="8dp"
  android:paddingRight="8dp"
  android:paddingTop="8dp">
  <TextView
    android:id="@+id/item_timeline_time"
    android:layout_height="wrap_content"
    android:layout_width="wrap_content"
    android:layout_marginRight="8dp"
    android:layout_marginTop="18dp"
    android:gravity="center_horizontal"
    android:padding="4dp"
    android:textColor="@color/colorAccent"
    android:textSize="16sp"
    android:text="2015-06-08\n09:56"
    />

  <RelativeLayout
    android:id="@+id/item_timeline_icon_layout"
    android:layout_width="48dp"
    android:layout_height="48dp"
    android:layout_marginBottom="4dp"
    android:layout_marginRight="8dp"
    android:layout_toRightOf="@id/item_timeline_time">

    <com.timelinedemo.CircleImageView
      android:id="@+id/item_timeline_icon_bg"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:src="@android:color/transparent"
      app:civ_border_width="4dp" />

    <ImageView
      android:id="@+id/item_timeline_icon"
      android:layout_width="24dp"
      android:layout_height="24dp"
      android:layout_centerInParent="true"
      android:scaleType="fitCenter" />

  </RelativeLayout>

  <TextView
    android:id="@+id/item_timeline_content"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_marginTop="18dp"
    android:layout_toRightOf="@id/item_timeline_icon_layout"
    android:text="今日收入"
    android:textColor="@color/colorPrimary"
    android:textSize="15sp" />

  <TextView
    android:id="@+id/item_timeline_money"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_below="@id/item_timeline_content"
    android:layout_marginTop="8dp"
    android:layout_toRightOf="@id/item_timeline_icon_layout"
    android:text="$ 100"
    android:textColor="@color/colorPrimary"
    android:textSize="22sp" />
  <View
    android:id="@+id/item_timeline_view"
    android:layout_width="2dp"
    android:layout_height="60dp"
    android:layout_alignLeft="@id/item_timeline_icon_layout"
    android:layout_below="@id/item_timeline_icon_layout"
    android:layout_marginLeft="23dp"
    android:background="@color/colorAccent" />
</RelativeLayout>

Activity.Java

public class MainActivity extends AppCompatActivity {

  private RecyclerView recyclerView;

  @Override
  protected void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.activity_main);
    initLayout();
  }
  private void initLayout(){
    recyclerView= (RecyclerView) findViewById(R.id.recyclerView);
    recyclerView.setLayoutManager(new LinearLayoutManager(this));
    recyclerView.setHasFixedSize(true);
    recyclerView.setItemAnimator(new DefaultItemAnimator());
    initData();
  }
  private void initData(){
    List<TimeInfo > list=new ArrayList<>();
    for(int i=0;i<15;i++){
      list.add(new TimeInfo());
    }
    TimelineAdapter mAdapter = new TimelineAdapter(this, list);
    recyclerView.setAdapter(mAdapter);
  }
}

添加依賴庫:

compile 'com.android.support:recyclerview-v7:23.0.0'

看完上述內(nèi)容,你們掌握Android開發(fā)中使用RecyclerView怎么實現(xiàn)一個時光軸效果的方法了嗎?如果還想學(xué)到更多技能或想了解更多相關(guān)內(nèi)容,歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道,感謝各位的閱讀!

網(wǎng)頁標(biāo)題:Android開發(fā)中使用RecyclerView怎么實現(xiàn)一個時光軸效果
URL分享:http://aaarwkj.com/article22/ggphcc.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站內(nèi)鏈、動態(tài)網(wǎng)站網(wǎng)站維護(hù)、企業(yè)網(wǎng)站制作、、小程序開發(fā)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

微信小程序開發(fā)
日本岛国免费一区二区| 新人妻一区二区在线视频| 国产精品毛片视频一区二区| 精品日韩av一区二区三区| 日本束缚人妻一区二区三区 | 伊人亚洲中文一区二区| 成人偷拍自拍在线视频| 成人av久久一区二区三区| 国产精品乱码中文字幕| 97国产一区二区精品久久呦| 欧美精品一区二区久久不卡| 国产亚洲欧美日韩精品| 亚洲大片色一区在线观看| 亚洲天堂成人av蜜臀| 青娱乐青青草91在线| 久久久久久极精品久久久| 亚洲国产一区二区精品| 色偷偷亚洲精品一区二区| 日本一级黄色影视大全| 81精品国产综合久久精品伦理| 中文字幕人妻熟女在线| 丰满人妻大屁一区二区| 丰满人妻毛片一区二区三区| 高清国语对白刺激av在线播放| 欧美黄片精品在线观看| 国产三级三级在线观看| av中文字幕在线激情| 国产黄色一区二区三区四区| 日本区一区二区三高清视频| 亚洲成色在线综合剧情网站 | 亚洲免费三级黄色片| 毛片成人18毛片免费看| 日本少妇熟女一区二区| 亚洲av资源一区二区| 国产亚洲一区二区三区乱码| 一区二区三区国产精品乱码| 91九色国产原创在线观看| 91久久福利国产成人精品| 香蕉视频欧美日韩国产| 成年人免费久久毛片| 亚洲av在线观看午夜|