今天就跟大家聊聊有关Android开发中怎么自定义时间轴,可能很多人都不太了解,为了让大家更加了解,小编给大家总结了以下内容,希望大家根据这篇文章可以有所收获。
成都创新互联长期为上千客户提供的网站建设服务,团队从业经验10年,关注不同地域、不同群体,并针对不同对象提供差异化的产品和服务;打造开放共赢平台,与合作伙伴共同营造健康的互联网生态环境。为莆田企业提供专业的成都做网站、成都网站制作,莆田网站改版等技术服务。拥有十余年丰富建站经验和众多成功案例,为您定制开发。具体内容如下
时间轴效果,实际上非常简单,就是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>
网站标题:Android开发中怎么自定义时间轴-创新互联
文章转载:https://www.cdcxhl.com/article10/cecpdo.html
成都网站建设公司_创新互联,为您提供网站策划、虚拟主机、响应式网站、品牌网站设计、外贸网站建设、网站设计公司
声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联