This commit is contained in:
lixiaopeng
2020-11-20 16:02:51 +08:00
parent 06a54758ab
commit 9fc4cd3cba
12 changed files with 370 additions and 302 deletions

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#1F2131"/>
<corners android:radius="12px"/>
</shape>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient
android:angle="180"
android:endColor="#FF4944"
android:startColor="#C23632" />
<corners android:radius="6px" />
</shape>

View File

@@ -5,201 +5,148 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<!--两层列表-->
<!--周边-->
<RelativeLayout
android:id="@+id/layout_surrounding_event"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!--周边-->
<!--顶部layout-->
<RelativeLayout
android:id="@+id/layout_surrounding_event"
android:id="@+id/layout_top"
android:layout_width="match_parent"
android:layout_height="match_parent">
<!--顶部layout-->
android:layout_height="@dimen/module_v2x_surrounding_top_height"
android:visibility="visible">
<TextView
android:id="@+id/tv_brief"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentTop="true"
android:layout_marginLeft="@dimen/module_v2x_surrounding_margin_left"
android:gravity="center_vertical"
android:text="周围5公里共15条交通信息"
android:textColor="@color/v2x_white"
android:textSize="@dimen/module_v2x_surrounding_top_textsize" />
<!-- android:layout_centerInParent="true"-->
<RelativeLayout
android:id="@+id/layout_top"
android:layout_width="match_parent"
android:layout_height="@dimen/module_v2x_surrounding_top_height"
android:visibility="visible">
android:layout_width="@dimen/module_v2x_surrounding_top_bt_width"
android:layout_height="@dimen/module_v2x_surrounding_top_bt_height"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginEnd="@dimen/module_v2x_surrounding_margin_left"
android:background="@drawable/bg_v2x_refresh"
android:gravity="center">
<TextView
android:id="@+id/tv_brief"
android:id="@+id/tv_top_refresh"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentTop="true"
android:layout_marginLeft="@dimen/module_v2x_surrounding_margin_left"
android:gravity="center_vertical"
android:text="周围5公里共15条交通信息"
android:textColor="@color/v2x_white"
android:layout_centerInParent="true"
android:gravity="center|center_horizontal"
android:text="@string/v2x_surrounding_refresh"
android:textColor="@color/v2x_item_white"
android:textSize="@dimen/module_v2x_surrounding_top_textsize"
android:textStyle="bold" />
</RelativeLayout>
</RelativeLayout>
<!--列表相关-->
<RelativeLayout
android:id="@+id/list_layout_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/layout_top"
android:layout_marginBottom="@dimen/module_v2x_panel_surrounding_marginbottom">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/surrounding_recycleview"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/module_v2x_surrounding_empty_tv_margin_top"
android:visibility="visible" />
<!--空数据显示-->
<RelativeLayout
android:id="@+id/layout_empty_data_show"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerHorizontal="true"
android:gravity="center_horizontal"
android:visibility="gone">
<ImageView
android:id="@+id/iv_empty"
android:layout_width="@dimen/module_v2x_surrounding_empty_image_height"
android:layout_height="@dimen/module_v2x_surrounding_empty_image_height"
android:layout_centerHorizontal="true"
android:layout_marginTop="@dimen/module_v2x_surrounding_empty_iv_margin_top"
android:src="@drawable/mogo_image_blank_nor" />
<TextView
android:id="@+id/tv_main_empty_1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/iv_empty"
android:layout_centerHorizontal="true"
android:layout_marginTop="@dimen/module_v2x_surrounding_empty_tv_margin_top"
android:gravity="center_horizontal"
android:text="周边5公里暂无交通事件"
android:textColor="@color/v2x_FFF_333"
android:textSize="@dimen/module_v2x_surrounding_top_textsize" />
<TextView
android:id="@+id/tv_main_empty_2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_main_empty_1"
android:layout_centerHorizontal="true"
android:layout_marginTop="1px"
android:gravity="center_horizontal"
android:text="你可以试着分享一个事件给其他车主"
android:textColor="@color/v2x_FFF_333"
android:textSize="@dimen/module_v2x_surrounding_top_textsize" />
<!-- android:layout_centerInParent="true"-->
<RelativeLayout
android:layout_width="@dimen/module_v2x_surrounding_top_bt_width"
android:layout_height="@dimen/module_v2x_surrounding_top_bt_height"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:layout_marginEnd="@dimen/module_v2x_surrounding_margin_left"
android:background="@drawable/bg_v2x_refresh"
android:gravity="center">
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/tv_main_empty_2"
android:layout_marginTop="@dimen/module_v2x_surrounding_empty_bt_margin_top">
<TextView
android:id="@+id/tv_top_refresh"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:gravity="center|center_horizontal"
android:id="@+id/tv_main_share"
android:layout_width="@dimen/module_v2x_surrounding_empty_bt_width"
android:layout_height="@dimen/module_v2x_surrounding_empty_bt_height"
android:layout_toLeftOf="@+id/center_empty"
android:background="@drawable/bg_v2x_go_to_share"
android:gravity="center"
android:text="@string/v2x_surrounding_go_to_share"
android:textColor="@color/v2x_white"
android:textSize="@dimen/module_v2x_surrounding_top_textsize"
android:textStyle="bold" />
<View
android:id="@+id/center_empty"
android:layout_width="@dimen/module_v2x_panel_surrounding_stance"
android:layout_height="@dimen/module_v2x_panel_surrounding_stance"
android:layout_centerInParent="true" />
<TextView
android:id="@+id/tv_main_refresh"
android:layout_width="@dimen/module_v2x_surrounding_empty_bt_width"
android:layout_height="@dimen/module_v2x_surrounding_empty_bt_height"
android:layout_toRightOf="@+id/center_empty"
android:background="@drawable/bg_v2x_refresh"
android:gravity="center"
android:text="@string/v2x_surrounding_refresh"
android:textColor="@color/v2x_item_white"
android:textColor="@color/v2x_white_refresh"
android:textSize="@dimen/module_v2x_surrounding_top_textsize"
android:textStyle="bold" />
</RelativeLayout>
</RelativeLayout>
<!--列表相关-->
<RelativeLayout
android:id="@+id/list_layout_container"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/layout_top"
android:layout_marginBottom="@dimen/module_v2x_panel_surrounding_marginbottom">
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/surrounding_recycleview"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/module_v2x_surrounding_empty_tv_margin_top"
android:visibility="visible" />
<!--空数据显示-->
<RelativeLayout
android:id="@+id/layout_empty_data_show"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerHorizontal="true"
android:gravity="center_horizontal"
android:visibility="gone">
<ImageView
android:id="@+id/iv_empty"
android:layout_width="@dimen/module_v2x_surrounding_empty_image_height"
android:layout_height="@dimen/module_v2x_surrounding_empty_image_height"
android:layout_centerHorizontal="true"
android:layout_marginTop="@dimen/module_v2x_surrounding_empty_iv_margin_top"
android:src="@drawable/mogo_image_blank_nor" />
<TextView
android:id="@+id/tv_main_empty_1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/iv_empty"
android:layout_centerHorizontal="true"
android:layout_marginTop="@dimen/module_v2x_surrounding_empty_tv_margin_top"
android:gravity="center_horizontal"
android:text="周边5公里暂无交通事件"
android:textColor="@color/v2x_FFF_333"
android:textSize="@dimen/module_v2x_surrounding_top_textsize" />
<TextView
android:id="@+id/tv_main_empty_2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/tv_main_empty_1"
android:layout_centerHorizontal="true"
android:layout_marginTop="1px"
android:gravity="center_horizontal"
android:text="你可以试着分享一个事件给其他车主"
android:textColor="@color/v2x_FFF_333"
android:textSize="@dimen/module_v2x_surrounding_top_textsize" />
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@+id/tv_main_empty_2"
android:layout_marginTop="@dimen/module_v2x_surrounding_empty_bt_margin_top">
<TextView
android:id="@+id/tv_main_share"
android:layout_width="@dimen/module_v2x_surrounding_empty_bt_width"
android:layout_height="@dimen/module_v2x_surrounding_empty_bt_height"
android:layout_toLeftOf="@+id/center_empty"
android:background="@drawable/bg_v2x_go_to_share"
android:gravity="center"
android:text="@string/v2x_surrounding_go_to_share"
android:textColor="@color/v2x_white"
android:textSize="@dimen/module_v2x_surrounding_top_textsize"
android:textStyle="bold" />
<View
android:id="@+id/center_empty"
android:layout_width="@dimen/module_v2x_panel_surrounding_stance"
android:layout_height="@dimen/module_v2x_panel_surrounding_stance"
android:layout_centerInParent="true" />
<TextView
android:id="@+id/tv_main_refresh"
android:layout_width="@dimen/module_v2x_surrounding_empty_bt_width"
android:layout_height="@dimen/module_v2x_surrounding_empty_bt_height"
android:layout_toRightOf="@+id/center_empty"
android:background="@drawable/bg_v2x_refresh"
android:gravity="center"
android:text="@string/v2x_surrounding_refresh"
android:textColor="@color/v2x_white_refresh"
android:textSize="@dimen/module_v2x_surrounding_top_textsize"
android:textStyle="bold" />
</RelativeLayout>
</RelativeLayout>
</RelativeLayout>
</RelativeLayout>
<!--周边详情-->
<RelativeLayout
android:id="@+id/layout_surrounding_event_detail"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone">
<!--顶部layout-->
<RelativeLayout
android:id="@+id/layout_top_detail"
android:layout_width="match_parent"
android:layout_height="@dimen/module_v2x_surrounding_top_height">
<ImageView
android:id="@+id/back_image"
android:layout_alignParentTop="true"
android:src="@drawable/v2x_back_image"
android:layout_marginLeft="@dimen/module_v2x_surrounding_margin_left"
android:layout_width="43px"
android:layout_height="43px"/>
<TextView
android:id="@+id/tv_brief_detail"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentTop="true"
android:layout_toRightOf="@+id/back_image"
android:layout_centerVertical="true"
android:layout_marginTop="8px"
android:layout_marginLeft="19px"
android:text="周围5公里共15条交通信息"
android:textColor="@color/v2x_white"
android:textSize="18px" />
</RelativeLayout>
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/surrounding_detail_recycleview"
android:layout_marginTop="30dp"
android:layout_marginLeft="@dimen/module_v2x_surrounding_margin_left"
android:layout_marginRight="@dimen/module_v2x_surrounding_margin_left"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="visible" />
</RelativeLayout>
</RelativeLayout>
<com.mogo.module.common.view.NetworkLoadingView
android:id="@+id/loading_iv"
android:layout_width="match_parent"

View File

@@ -92,10 +92,47 @@
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="@+id/rgTabSelect" />
<!-- <View-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="58px"-->
<!-- android:background="@drawable/v2x_shadow_shape_view"-->
<!-- app:layout_constraintBottom_toBottomOf="parent" />-->
<!--顶部layout-->
<ImageView
android:id="@+id/back_image"
android:layout_width="43px"
android:layout_height="43px"
android:layout_alignParentTop="true"
android:layout_marginLeft="@dimen/module_v2x_surrounding_margin_left"
android:src="@drawable/v2x_back_image"
android:visibility="gone"
android:layout_marginTop="18px"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tv_brief_detail"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="19px"
android:layout_marginTop="26px"
app:layout_constraintLeft_toRightOf="@+id/back_image"
app:layout_constraintTop_toTopOf="parent"
android:text="周围5公里共15条交通信息"
android:textColor="@color/v2x_white"
android:visibility="gone"
android:textSize="18px" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/surrounding_detail_recycleview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/module_v2x_surrounding_margin_left"
android:layout_marginTop="90px"
android:visibility="gone"
app:layout_constraintTop_toBottomOf="@+id/back_image"
android:layout_marginRight="@dimen/module_v2x_surrounding_margin_left" />
<!-- <View-->
<!-- android:layout_width="match_parent"-->
<!-- android:layout_height="58px"-->
<!-- android:background="@drawable/v2x_shadow_shape_view"-->
<!-- app:layout_constraintBottom_toBottomOf="parent" />-->
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -5,7 +5,7 @@
android:id="@+id/surrounding_root"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/bg_v2x_event_list_item">
android:background="@drawable/bg_v2x_surrounding_event_list_item">
<TextView
android:id="@+id/surrounding_road_type_address"
@@ -21,7 +21,7 @@
app:layout_constraintEnd_toStartOf="@+id/surrounding_road_like"
app:layout_constraintStart_toStartOf="@id/surrounding_road_type"
app:layout_constraintTop_toTopOf="parent"
tools:text="小黄庄北街与北三环辅路交叉口小黄庄北街与北三环辅路交叉口" />
tools:text="小黄庄北街与北三环辅路交叉口" />
<TextView
android:id="@+id/surrounding_username"
@@ -30,10 +30,11 @@
android:alpha="0.6"
android:textColor="@color/v2x_FFF_666"
android:textSize="16px"
android:layout_marginStart="@dimen/dp_36"
android:layout_marginStart="20px"
android:layout_marginTop="6px"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/surrounding_road_type_address"
tools:text="赵云" />
tools:text="小蘑菇" />
<TextView
android:id="@+id/surrounding_time"
@@ -42,8 +43,9 @@
android:alpha="0.6"
android:textColor="@color/v2x_FFF_666"
android:textSize="16px"
android:layout_marginStart="@dimen/dp_80"
app:layout_constraintStart_toStartOf="@+id/surrounding_username"
android:layout_marginStart="@dimen/dp_30"
android:layout_marginTop="6px"
app:layout_constraintStart_toEndOf="@+id/surrounding_username"
app:layout_constraintTop_toBottomOf="@+id/surrounding_road_type_address"
tools:text="2020-1-12" />
@@ -51,14 +53,14 @@
android:id="@+id/surrounding_road_type"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_36"
android:layout_marginTop="@dimen/dp_12"
android:layout_marginStart="20px"
android:layout_marginTop="6px"
android:layout_marginBottom="@dimen/dp_36"
android:background="@drawable/bg_v2x_event_type_read"
android:gravity="center"
android:paddingLeft="5px"
android:paddingLeft="6px"
android:paddingTop="3px"
android:paddingRight="5px"
android:paddingRight="6px"
android:paddingBottom="3px"
android:text="违章停车"
android:textColor="#ffffff"