今天就跟大家聊聊有关Android开发中怎么自定义时间轴,可能很多人都不太了解,为了让大家更加了解,小编给大家总结了以下内容,希望大家根据这篇文章可以有所收获。具体内容如下 时间轴效果,实际上非常简单,就是listView中一个又一个的条目
今天就跟大家聊聊有关Android开发中怎么自定义时间轴,可能很多人都不太了解,为了让大家更加了解,小编给大家总结了以下内容,希望大家根据这篇文章可以有所收获。
具体内容如下
时间轴效果,实际上非常简单,就是listView中一个又一个的条目而已….大家可以只关注一个条目。
首先展示一个条目的布局效果
<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="Http://schemas.android.com/apk/res/android" android:layout_width="match_parent" android:layout_height="75dp" android:orientation="horizontal" > <!-- 线条部分 --> <LinearLayout android:layout_width="wrap_content" android:layout_height="match_parent" android:gravity="center_horizontal" android:orientation="vertical" android:paddingLeft="30dp" > <View android:layout_width="3Dp" android:layout_height="20dp" android:background="#88000000" /> <com.example.time.TimeView android:src="@drawable/ic_launcher" android:id="@+id/timeView" android:layout_width="40dp" android:layout_height="40dp" /> <View android:layout_width="3dp" android:layout_height="40dp" android:background="#88000000" /> </LinearLayout> <!-- 文字部分 --> <LinearLayout android:layout_width="match_parent" android:layout_height="match_parent" android:orientation="vertical" android:paddingLeft="30dp" android:paddingRight="30dp" android:paddingTop="20dp" > <TextView android:id="@+id/tv_content" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="哈哈哈" android:textColor="#ABABAB" /> <TextView android:id="@+id/tv_time" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@id/tv_content" android:text="时间" android:textColor="#ABABAB" /> </LinearLayout></LinearLayout>
--结束END--
本文标题: Android开发中怎么自定义时间轴
本文链接: https://www.lsjlt.com/news/225930.html(转载时请注明来源链接)
有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341
下载Word文档到电脑,方便收藏和打印~
2024-05-21
2024-05-21
2024-05-21
2024-05-21
2024-05-21
2024-05-21
2024-05-21
2024-05-21
2024-05-21
2024-05-21
回答
回答
回答
回答
回答
回答
回答
回答
回答
回答
0