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

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在线播放| 亚洲成综合人在线播放| 欧美精品黑人三级精品| 国产av自拍在线免费观看| 夜夜爽精品国产亚洲av成人| 色伊人久久综合中文字幕| 最新亚洲国产高清激情| 国产亚洲一区二区三区在线| 国产日韩欧美亚洲一区二区| 亚洲va久久久噜噜噜久久狠| 亚洲乱码在线中文字幕| 国产在线视频不卡福利片| 国产内射一级一片高清视频观看| 天天操时时操夜夜操| 日日激情综合久久一区| 国产成人综合欧美日韩另类| 国产内射一级一片内射高清视频1| 亚洲无人区码一码二码三码| 天天日天天天干夜夜操| 玩弄丰满熟妇班主任老师| 欧美一区二区三区日韩精品| 亚洲综合另类视频在线观看| 亚洲夫妻性生活免费视频| 国产精品熟女在线视频| 丁香六月综合激情啪啪啪| 中文字幕乱码一区二区欧美| 亚洲av毛片在线网站| 日韩国产欧美亚洲一区| 日韩精品人妻一区二区网站| 欧美日韩亚洲国产精品视频| 日本一区二区三区在线观看视频| 亚洲精品国产av成人网| 五月婷婷色丁香综合激情| 91麻豆成人国产在线观看| av岛国不卡一区二区在线观看| 久久99精品久久久子伦| 狼人综合狼人综合网站|