美文网首页我爱编程android开发
Android仿淘宝物流追踪

Android仿淘宝物流追踪

作者: 银月银月 | 来源:发表于2017-11-18 12:05 被阅读322次

弄这么一个界面网上大都说加什么时间控件,想想我就好伤心,我懒呀,不想再加那么复杂的东西啊,何况只是显示,没其它作用,搞那么复杂干什么是不是。

其实可以各个view的相对位置来实现啊,比如,那个圆点也可以用imageview实现啊,唯一不同的就是竖线的view是穿过灰色的圆view的,大家有没有发现,除了第一个圆点意外的其他圆点,都是在那条水平的分割线下固定高度的位置(我这里好像是10dp)的左侧 ,那我完全可以在这个分割线下方弄一个空的View,那么穿过圆孔的这条竖线不就是在这个空的View的上方,在圆点的下方,并且高度是match,这样,通过一个相对布局,这个时间轴的问题也解决了

RelativeLayout

android:layout_width="match_parent"

android:layout_height="wrap_content"

android:background="@color/background"

android:orientation="horizontal">

android:id="@+id/v_round"

android:layout_width="@dimen/common_dp_15"

android:layout_height="@dimen/common_dp_15"

android:src="@drawable/dot_gray_shape"/>

android:id="@+id/status_title"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_toRightOf="@id/v_round"

android:layout_marginLeft="10dp"

android:text="订单已生成"

android:textColor="@color/black"

android:textSize="14sp"/>

android:id="@+id/status_time"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_alignParentRight="true"

android:layout_marginRight="@dimen/common_dp_10"

android:text="2017-11-30"

android:textSize="10sp"/>

android:id="@+id/status_content"

android:layout_width="wrap_content"

android:layout_height="wrap_content"

android:layout_below="@id/status_title"

android:layout_marginTop="@dimen/common_dp_10"

android:layout_marginLeft="10dp"

android:layout_marginBottom="@dimen/common_dp_15"

android:layout_toRightOf="@id/v_round"

android:text="订单已生成"

android:textSize="10sp"/>

android:id="@+id/empty_view"

android:layout_width="1dp"

android:layout_height="0.1dp"

android:layout_below="@id/status_content"

android:layout_marginLeft="10dp"/>

android:id="@+id/v_line"

android:layout_width="1dp"

android:layout_height="match_parent"

android:layout_above="@id/empty_view"

android:layout_alignLeft="@id/v_round"

android:layout_below="@id/v_round"

android:layout_marginLeft="7dp"

android:background="@color/background2"/>

RelativeLayout〉

然后在adpter里设置一下最新状态的区别就好了

相关文章

  • Android仿淘宝物流追踪

    弄这么一个界面网上大都说加什么时间控件,想想我就好伤心,我懒呀,不想再加那么复杂的东西啊,何况只是显示,没其它作用...

  • Android仿淘宝物流追踪

    github地址(欢迎下载完整Demo) https://github.com/zhouxu88/Logistic...

  • IOS 高德首页及淘宝物流界面推拉效果探索

    仿高德和淘宝物流的推拉效果进行了一些尝试调整,无图言鸟,先吃我一发效果图。 高德首页悬停推拉效果: 淘宝物流蒙层推...

  • 做商城开发时一些收藏

    Android开发之仿淘宝商品详情页 - AnalyzeSystem的博客 - CSDN博客 GitHub - l...

  • AndroidView

    Android 沉浸式 (透明) 状态栏适配 Android 沉浸式状态栏仿淘宝、京东拖拽商品详情(可嵌套View...

  • Android 仿淘宝历史搜索

    简介 前一段时间项目里面要做一个仿淘宝历史搜索的功能,现将这个demo整理 需求 首先我们来看看淘宝历史搜索规则 ...

  • 跑步让我自信飞扬

    每逢无聊时总会抱起手机,东逛逛淘宝,西看看云集,总觉得心里空落落的,想买点啥。看到有物流追踪也总是不停的刷刷刷,焦...

  • 音频 - 收藏集 - 掘金

    Android 仿 YouTube 拖拽视频效果的实现 - Android - 掘金Android仿YouTube...

  • 滑动 - 收藏集 - 掘金

    Android 仿 YouTube 拖拽视频效果的实现 - Android - 掘金Android仿YouTube...

  • Android ViewFlipper仿淘宝消息滚动

    使用场景: 仿淘宝消息滚动,之前有类似的demo,但是都是一大堆代码或者找个库,无意中看到官方竟然有实现他的Vie...

网友评论

    本文标题:Android仿淘宝物流追踪

    本文链接:https://www.haomeiwen.com/subject/hcjevxtx.html