Merge branch 'ui' into dev
This commit is contained in:
@@ -3,6 +3,7 @@ package com.mogo.module.v2x.fragment;
|
||||
import android.content.Context;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
import android.widget.LinearLayout;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.coordinatorlayout.widget.CoordinatorLayout;
|
||||
@@ -37,7 +38,7 @@ public class V2XScenarioHistoryFragment
|
||||
private String TAG = "ScenarioHistoryFragment";
|
||||
|
||||
private V2XListEmptyView mEmptyView;
|
||||
private CoordinatorLayout mClHistoryList;
|
||||
private LinearLayout mClHistoryList;
|
||||
private RecyclerView mRecyclerView;
|
||||
private V2XScenarioHistoryAdapter mV2XScenarioHistoryAdapter;
|
||||
private ArrayList<V2XHistoryScenarioData> mV2XHistoryScenarioData = new ArrayList<>();
|
||||
|
||||
@@ -18,6 +18,9 @@ import com.mogo.skin.support.IMogoSkinCompatSupportable;
|
||||
import com.mogo.skin.support.IMogoSkinSupportInstaller;
|
||||
import com.mogo.skin.support.MogoSkinManager;
|
||||
import com.mogo.skin.support.SkinMode;
|
||||
import com.mogo.skin.support.helper.MogoSkinCompatBackgroundHelperDelegate;
|
||||
import com.mogo.skin.support.helper.MogoSkinCompatHelperDelegate;
|
||||
import com.mogo.skin.support.helper.MogoSkinCompatTextHelperDelegate;
|
||||
|
||||
/**
|
||||
* author : donghongyu
|
||||
@@ -31,19 +34,14 @@ public class RoundConstraintLayout extends ConstraintLayout implements IMogoSkin
|
||||
private float roundLayoutRadius = 14f;
|
||||
private Path roundPath;
|
||||
private RectF rectF;
|
||||
|
||||
private MogoSkinCompatBackgroundHelperDelegate mBackgroundTintHelper;
|
||||
|
||||
public RoundConstraintLayout(Context context) {
|
||||
this(context, null);
|
||||
}
|
||||
|
||||
public RoundConstraintLayout(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
this(context, attrs);
|
||||
}
|
||||
|
||||
public RoundConstraintLayout(Context context, AttributeSet attrs) {
|
||||
super(context, attrs);
|
||||
|
||||
this(context, attrs, 0);
|
||||
TypedArray typedArray = context.obtainStyledAttributes(attrs, R.styleable.RoundLayout);
|
||||
roundLayoutRadius = typedArray.getDimensionPixelSize(R.styleable.RoundLayout_roundLayoutRadius, (int) roundLayoutRadius);
|
||||
typedArray.recycle();
|
||||
@@ -51,6 +49,13 @@ public class RoundConstraintLayout extends ConstraintLayout implements IMogoSkin
|
||||
init();
|
||||
}
|
||||
|
||||
public RoundConstraintLayout(Context context, AttributeSet attrs, int defStyleAttr) {
|
||||
super(context, attrs, defStyleAttr);
|
||||
mBackgroundTintHelper = new MogoSkinCompatBackgroundHelperDelegate(this);
|
||||
mBackgroundTintHelper.loadFromAttributes(attrs, defStyleAttr);
|
||||
}
|
||||
|
||||
|
||||
private void init() {
|
||||
setWillNotDraw(false);//如果你继承的是ViewGroup,注意此行,否则draw方法是不会回调的;
|
||||
roundPath = new Path();
|
||||
@@ -84,9 +89,11 @@ public class RoundConstraintLayout extends ConstraintLayout implements IMogoSkin
|
||||
super.draw(canvas);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void applySkin() {
|
||||
|
||||
if (mBackgroundTintHelper != null) {
|
||||
mBackgroundTintHelper.applySkin();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.7 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.5 KiB |
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<com.mogo.module.v2x.view.RoundConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/rlContent"
|
||||
@@ -84,4 +84,4 @@
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</com.mogo.module.v2x.view.RoundConstraintLayout>
|
||||
|
||||
@@ -5,105 +5,95 @@
|
||||
android:id="@+id/clPanelContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/v2x_panel_list_background"
|
||||
android:clickable="true"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible">
|
||||
|
||||
<androidx.cardview.widget.CardView
|
||||
<RadioGroup
|
||||
android:id="@+id/rgTabSelect"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
app:cardBackgroundColor="@color/panel_shadow_shape_color"
|
||||
app:cardCornerRadius="16px">
|
||||
android:layout_height="@dimen/dp_154"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
<RadioButton
|
||||
android:id="@+id/rbScenarioHistory"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:button="@null"
|
||||
android:checked="true"
|
||||
android:gravity="center"
|
||||
android:paddingStart="@dimen/dp_40"
|
||||
android:paddingEnd="@dimen/dp_40"
|
||||
android:text="出行动态"
|
||||
android:textColor="@color/radiobutton_textcolor"
|
||||
android:textSize="@dimen/dp_40"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<RadioGroup
|
||||
android:id="@+id/rgTabSelect"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="@dimen/dp_154"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal">
|
||||
<View
|
||||
android:layout_width="0.5px"
|
||||
android:layout_height="@dimen/dp_42"
|
||||
android:background="#757575" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rbScenarioHistory"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:button="@null"
|
||||
android:checked="true"
|
||||
android:gravity="center"
|
||||
android:paddingStart="@dimen/dp_40"
|
||||
android:paddingEnd="@dimen/dp_40"
|
||||
android:text="出行动态"
|
||||
android:textColor="@color/radiobutton_textcolor"
|
||||
android:textSize="@dimen/dp_40"
|
||||
android:textStyle="bold" />
|
||||
<RadioButton
|
||||
android:id="@+id/rbSurroundingEvent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:button="@null"
|
||||
android:gravity="center"
|
||||
android:paddingStart="@dimen/dp_40"
|
||||
android:paddingEnd="@dimen/dp_40"
|
||||
android:text="周边事件"
|
||||
android:textColor="@color/radiobutton_textcolor"
|
||||
android:textSize="@dimen/dp_40"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<View
|
||||
android:layout_width="0.5px"
|
||||
android:layout_height="@dimen/dp_42"
|
||||
android:background="#757575" />
|
||||
<View
|
||||
android:layout_width="0.5px"
|
||||
android:layout_height="@dimen/dp_42"
|
||||
android:background="#757575" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rbSurroundingEvent"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:button="@null"
|
||||
android:gravity="center"
|
||||
android:paddingStart="@dimen/dp_40"
|
||||
android:paddingEnd="@dimen/dp_40"
|
||||
android:text="周边事件"
|
||||
android:textColor="@color/radiobutton_textcolor"
|
||||
android:textSize="@dimen/dp_40"
|
||||
android:textStyle="bold" />
|
||||
<RadioButton
|
||||
android:id="@+id/rbShareEvents"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:button="@null"
|
||||
android:gravity="center"
|
||||
android:paddingStart="@dimen/dp_40"
|
||||
android:paddingEnd="@dimen/dp_40"
|
||||
android:text="我的分享"
|
||||
android:textColor="@color/radiobutton_textcolor"
|
||||
android:textSize="@dimen/dp_40"
|
||||
android:textStyle="bold" />
|
||||
</RadioGroup>
|
||||
|
||||
<View
|
||||
android:layout_width="0.5px"
|
||||
android:layout_height="@dimen/dp_42"
|
||||
android:background="#757575" />
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/vpEventPanel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:nestedScrollingEnabled="false"
|
||||
android:overScrollMode="never"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/rgTabSelect" />
|
||||
|
||||
<RadioButton
|
||||
android:id="@+id/rbShareEvents"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:button="@null"
|
||||
android:gravity="center"
|
||||
android:paddingStart="@dimen/dp_40"
|
||||
android:paddingEnd="@dimen/dp_40"
|
||||
android:text="我的分享"
|
||||
android:textColor="@color/radiobutton_textcolor"
|
||||
android:textSize="@dimen/dp_40"
|
||||
android:textStyle="bold" />
|
||||
</RadioGroup>
|
||||
<ImageView
|
||||
android:id="@+id/btnHidePanels"
|
||||
android:layout_width="@dimen/dp_88"
|
||||
android:layout_height="@dimen/dp_88"
|
||||
android:layout_marginRight="28px"
|
||||
android:background="@drawable/icon_window_close"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/rgTabSelect"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="@+id/rgTabSelect" />
|
||||
|
||||
<androidx.viewpager2.widget.ViewPager2
|
||||
android:id="@+id/vpEventPanel"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:nestedScrollingEnabled="false"
|
||||
android:overScrollMode="never"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/rgTabSelect" />
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="58px"
|
||||
android:background="@drawable/v2x_shadow_shape_view"
|
||||
app:layout_constraintBottom_toBottomOf="parent" />
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/btnHidePanels"
|
||||
android:layout_width="@dimen/dp_88"
|
||||
android:layout_height="@dimen/dp_88"
|
||||
android:layout_marginRight="28px"
|
||||
android:background="@drawable/icon_window_close"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/rgTabSelect"
|
||||
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" />
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
@@ -12,30 +12,23 @@
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
<LinearLayout
|
||||
android:orientation="vertical"
|
||||
android:id="@+id/clHistoryList"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
android:id="@+id/appbar"
|
||||
<TextView
|
||||
android:id="@+id/tvMessage"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:background="#00000000">
|
||||
|
||||
<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:text="今日出行遇到的交通事件"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/dp_36"
|
||||
android:textStyle="bold"
|
||||
app:layout_scrollFlags="scroll|enterAlways" />
|
||||
|
||||
</com.google.android.material.appbar.AppBarLayout>
|
||||
android:paddingStart="@dimen/dp_60"
|
||||
android:paddingBottom="@dimen/dp_27"
|
||||
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"
|
||||
@@ -44,6 +37,6 @@
|
||||
android:overScrollMode="never"
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior"
|
||||
tools:listitem="@layout/item_v2x_illegal_parking" />
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
</LinearLayout>
|
||||
|
||||
</RelativeLayout>
|
||||
@@ -36,7 +36,7 @@
|
||||
android:layout_height="48px"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_toLeftOf="@id/center"
|
||||
android:background="@drawable/v2xt_dw_common_corner_bkg_dark"
|
||||
android:background="#3F4057"
|
||||
android:clickable="true"
|
||||
android:onClick="shareEventAction"
|
||||
android:text="去分享"
|
||||
|
||||
@@ -18,5 +18,6 @@
|
||||
<color name="v2x_ff6163_333">#ff616381</color>
|
||||
<color name="v2x_FFF_666">#FFFFFF</color>
|
||||
<color name="v2x_555A_F5F5">#555A75</color>
|
||||
<color name="v2x_000_FFF">#000000</color>
|
||||
|
||||
</resources>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 2.7 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 4.5 KiB |
@@ -14,5 +14,5 @@
|
||||
<color name="v2x_FFF_333_light">#333333</color>
|
||||
<color name="v2x_FFF_666_light">#666666</color>
|
||||
<color name="v2x_555A_F5F5_light">#F5F5F5</color>
|
||||
|
||||
<color name="v2x_000_FFF_light">#FFFFFF</color>
|
||||
</resources>
|
||||
|
||||
Reference in New Issue
Block a user