出行动态
    分享按钮背景
    Tab选中加粗效果
    上边距,左边
    关闭按钮位置
    去掉了列表上方标题的加粗
    没有更多记录的颜色
This commit is contained in:
董宏宇
2020-09-16 16:43:44 +08:00
parent 4da2a88fb0
commit cb35854b49
22 changed files with 62 additions and 41 deletions

View File

@@ -1,6 +1,7 @@
package com.mogo.module.v2x.fragment
import android.content.Intent
import android.graphics.Typeface
import android.view.View
import android.widget.ImageView
import android.widget.RadioButton
@@ -123,14 +124,29 @@ class V2XEventPanelFragment : MvpFragment<V2XEventPanelFragment, EventPanelPrese
mRgTabSelect?.setOnCheckedChangeListener { group, checkedId ->
when (checkedId) {
R.id.rbScenarioHistory -> {
// 更改选中是否加粗
mRbScenarioHistory?.typeface = Typeface.defaultFromStyle(Typeface.BOLD)
mRbSurroundingEvent?.typeface = Typeface.defaultFromStyle(Typeface.NORMAL)
mRbShareEvents?.typeface = Typeface.defaultFromStyle(Typeface.NORMAL)
TrackUtils.trackV2xHistoryEvent(2)
mVpEventPanel?.setCurrentItem(0, false)
}
R.id.rbSurroundingEvent -> {
// 更改选中是否加粗
mRbScenarioHistory?.typeface = Typeface.defaultFromStyle(Typeface.NORMAL)
mRbSurroundingEvent?.typeface = Typeface.defaultFromStyle(Typeface.BOLD)
mRbShareEvents?.typeface = Typeface.defaultFromStyle(Typeface.NORMAL)
TrackUtils.trackV2xHistoryEvent(3)
mVpEventPanel?.setCurrentItem(1, false)
}
R.id.rbShareEvents -> {
// 更改选中是否加粗
mRbScenarioHistory?.typeface = Typeface.defaultFromStyle(Typeface.NORMAL)
mRbSurroundingEvent?.typeface = Typeface.defaultFromStyle(Typeface.NORMAL)
mRbShareEvents?.typeface = Typeface.defaultFromStyle(Typeface.BOLD)
TrackUtils.trackV2xHistoryEvent(4)
mVpEventPanel?.setCurrentItem(2, false)
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

View File

@@ -2,6 +2,5 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#1F2131"/>
<corners android:radius="12px"/>
<corners android:radius="@dimen/dp_40"/>
</shape>

View File

@@ -3,5 +3,5 @@
<gradient
android:startColor="#10121E"
android:endColor="#10121E"/>
<corners android:radius="28.8px"/>
<corners android:radius="@dimen/dp_40"/>
</shape>

View File

@@ -2,17 +2,18 @@
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="40px"
android:paddingTop="40px">
android:paddingTop="@dimen/dp_40"
android:paddingBottom="@dimen/dp_40">
<Button
android:id="@+id/event_share_load_status"
android:layout_width="@dimen/v2x_share_btn_width"
android:layout_height="wrap_content"
android:paddingTop="12px"
android:paddingBottom="12px"
android:layout_centerInParent="true"
android:background="@drawable/v2xt_dw_common_corner_bkg_light"
android:gravity="center"
android:paddingTop="@dimen/dp_12"
android:paddingBottom="@dimen/dp_12"
android:text="查看更早记录"
android:textColor="#FFFFFF"
android:textSize="@dimen/dp_34" />

View File

@@ -72,7 +72,7 @@
android:layout_height="wrap_content"
android:layout_marginStart="@dimen/dp_10"
android:layout_marginEnd="@dimen/dp_30"
android:textColor="@android:color/white"
android:textColor="@color/v2x_FFF_333"
android:textSize="@dimen/dp_33"
android:textStyle="bold"
app:layout_constraintEnd_toStartOf="@+id/tvFaultHelpDistance"
@@ -86,11 +86,11 @@
android:id="@+id/tvFaultHelpEventTime"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginBottom="@dimen/dp_24"
android:alpha="0.59"
android:textColor="@android:color/white"
android:textColor="@color/v2x_FFF_666"
android:textSize="@dimen/dp_29"
app:layout_constraintBottom_toBottomOf="parent"
android:layout_marginBottom="@dimen/dp_24"
app:layout_constraintStart_toStartOf="@+id/tvFaultHelpName"
app:layout_constraintTop_toBottomOf="@id/tvFaultHelpName"
tools:text="15:30发布求助信息" />
@@ -101,7 +101,7 @@
android:layout_height="wrap_content"
android:layout_marginEnd="@dimen/dp_30"
android:gravity="center_vertical"
android:textColor="#FFF"
android:textColor="@color/v2x_FFF_333"
android:textSize="@dimen/dp_80"
android:textStyle="bold"
app:layout_constraintBottom_toBottomOf="@+id/ivFaultHelpEventCall"

View File

@@ -13,10 +13,11 @@
<RadioGroup
android:id="@+id/rgTabSelect"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_125"
android:layout_height="@dimen/module_v2x_panel_tab_height"
android:gravity="center_vertical"
android:orientation="horizontal"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
@@ -27,17 +28,17 @@
android:button="@null"
android:checked="true"
android:gravity="center"
android:paddingStart="@dimen/dp_40"
android:paddingEnd="@dimen/dp_40"
android:paddingStart="@dimen/dp_48"
android:paddingEnd="@dimen/dp_35"
android:text="出行动态"
android:textColor="@color/radiobutton_textcolor"
android:textSize="@dimen/dp_40"
android:textStyle="bold" />
<View
android:layout_width="0.5px"
android:layout_width="1px"
android:layout_height="@dimen/dp_42"
android:background="#757575" />
android:background="#CE757575" />
<RadioButton
android:id="@+id/rbSurroundingEvent"
@@ -45,17 +46,16 @@
android:layout_height="match_parent"
android:button="@null"
android:gravity="center"
android:paddingStart="@dimen/dp_40"
android:paddingEnd="@dimen/dp_40"
android:paddingStart="@dimen/dp_35"
android:paddingEnd="@dimen/dp_35"
android:text="周边事件"
android:textColor="@color/radiobutton_textcolor"
android:textSize="@dimen/dp_40"
android:textStyle="bold" />
android:textSize="@dimen/dp_40" />
<View
android:layout_width="0.5px"
android:layout_width="1px"
android:layout_height="@dimen/dp_42"
android:background="#757575" />
android:background="#CE757575" />
<RadioButton
android:id="@+id/rbShareEvents"
@@ -63,12 +63,11 @@
android:layout_height="match_parent"
android:button="@null"
android:gravity="center"
android:paddingStart="@dimen/dp_40"
android:paddingEnd="@dimen/dp_40"
android:paddingStart="@dimen/dp_35"
android:paddingEnd="@dimen/dp_35"
android:text="我的分享"
android:textColor="@color/radiobutton_textcolor"
android:textSize="@dimen/dp_40"
android:textStyle="bold" />
android:textSize="@dimen/dp_40" />
</RadioGroup>
<androidx.viewpager2.widget.ViewPager2
@@ -85,9 +84,9 @@
<ImageView
android:id="@+id/btnHidePanels"
android:layout_width="@dimen/dp_88"
android:layout_height="@dimen/dp_88"
android:layout_marginRight="28px"
android:layout_width="@dimen/dp_79"
android:layout_height="@dimen/dp_79"
android:layout_marginRight="@dimen/dp_50"
android:background="@drawable/v2x_panel_close"
app:layout_constraintBottom_toBottomOf="@+id/rgTabSelect"
app:layout_constraintRight_toRightOf="parent"

View File

@@ -13,27 +13,26 @@
tools:visibility="visible" />
<LinearLayout
android:orientation="vertical"
android:id="@+id/clHistoryList"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:id="@+id/tvMessage"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingStart="@dimen/dp_60"
android:paddingBottom="@dimen/dp_27"
android:paddingStart="@dimen/dp_28"
android:text="今日出行遇到的交通事件"
android:textColor="@color/v2x_FFF_333"
android:textSize="@dimen/dp_36"
android:textStyle="bold"
app:layout_scrollFlags="scroll|enterAlways" />
<androidx.recyclerview.widget.RecyclerView
android:id="@+id/recyclerView"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/dp_27"
android:overScrollMode="never"
app:layout_behavior="@string/appbar_scrolling_view_behavior"
tools:listitem="@layout/item_v2x_illegal_parking" />

View File

@@ -73,5 +73,7 @@
<dimen name="share_btn_middle_padding">29px</dimen>
<dimen name="v2x_panel_btn_translationY">-8px</dimen>
<dimen name="module_v2x_panel_tab_height">84px</dimen>
</resources>

View File

@@ -54,7 +54,8 @@
<dimen name="module_v2x_surrounding_item_bottom_right_textsize">28px</dimen>
<dimen name="module_v2x_des_index_width">16px</dimen>
<dimen name="module_v2x_des_index_height">42px</dimen>
<dimen name="module_v2x_panel_cor">16px</dimen>
<dimen name="module_v2x_panel_width">120px</dimen>
<dimen name="module_v2x_panel_tab_height">158px</dimen>
</resources>

View File

@@ -72,5 +72,7 @@
<dimen name="v2x_panel_btn_translationY">-10px</dimen>
<dimen name="v2x_panel_btn_image_width">114px</dimen>
<dimen name="module_v2x_panel_tab_height">158px</dimen>
</resources>

View File

@@ -9,7 +9,7 @@
<color name="transparent_white_30">#B3FFFFFF</color>
<color name="surrounding_item_bottom_color">#1F2131</color>
<color name="panel_shadow_shape_color">#10121E</color>
<color name="share_event_no_more_color">#99FFFFFF</color>
<color name="share_event_no_more_color">#4BFFFFFF</color>
<color name="v2x_FFF_999">#FFFFFF</color>
<color name="v2x_FFF_333">#FFFFFF</color>
<color name="v2x_ff6163_333">#ff616381</color>

View File

@@ -74,5 +74,7 @@
<dimen name="v2x_panel_btn_translationY">-8px</dimen>
<dimen name="module_v2x_panel_tab_height">84px</dimen>
</resources>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.5 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

View File

@@ -2,6 +2,6 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<solid android:color="#DDDDDD"/>
<corners android:radius="12px"/>
<corners android:radius="@dimen/dp_40"/>
</shape>

View File

@@ -3,5 +3,5 @@
<gradient
android:startColor="#FFFFFF"
android:endColor="#F5F5F5"/>
<corners android:radius="28.8px"/>
<corners android:radius="@dimen/dp_40"/>
</shape>

View File

@@ -4,7 +4,7 @@
<shape>
<corners android:radius="@dimen/dp_180" />
<gradient
android:angle="180"
android:angle="360"
android:endColor="#5CC1FF"
android:startColor="#256BFF" />
</shape>
@@ -13,7 +13,7 @@
<shape>
<corners android:radius="@dimen/dp_180" />
<gradient
android:angle="180"
android:angle="360"
android:endColor="#5CC1FF"
android:startColor="#256BFF" />
</shape>

View File

@@ -8,7 +8,7 @@
<color name="v2x_white_light">#333333</color>
<color name="v2x_item_white_light">#FFFFFF</color>
<color name="v2x_white_refresh_light">#FFFFFF</color>
<color name="share_event_no_more_color_light">#333333</color>
<color name="share_event_no_more_color_light">#CB333333</color>
<color name="v2x_FFF_999_light">#999999</color>
<color name="v2x_FFF_333_light">#B2333333</color>
<color name="v2x_FFF_666_light">#666666</color>