Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
wangcongtao
2020-09-04 09:23:35 +08:00
57 changed files with 629 additions and 195 deletions

2
.idea/misc.xml generated
View File

@@ -4,7 +4,7 @@
<asm skipDebug="false" skipFrames="false" skipCode="false" expandFrames="false" />
<groovy codeStyle="LEGACY" />
</component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="JDK" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/build/classes" />
</component>
</project>

View File

@@ -1,6 +1,7 @@
package com.mogo.module.authorize.layout
import android.content.Context
import android.graphics.drawable.ColorDrawable
import android.text.Html
import android.view.View
import android.widget.Button
@@ -14,6 +15,7 @@ import com.mogo.module.authorize.voice.IVoiceAuthorizeIntentListener
import com.mogo.module.authorize.voice.IVoiceCommandListener
import com.mogo.module.authorize.voice.VoiceUtil
import com.mogo.module.common.dialog.BaseFloatDialog
import com.mogo.module.common.utils.CarSeries
import com.mogo.utils.TipToast
import com.mogo.utils.logger.Logger
import kotlinx.coroutines.Dispatchers
@@ -62,7 +64,12 @@ class AuthorizeDialog : BaseFloatDialog, View.OnClickListener, IVoiceCommandList
private fun setWrapContent() {
val mWindow = window
if(DebugConfig.getCarMachineType() != DebugConfig.CAR_MACHINE_TYPE_BYD){
if (mWindow != null) {
if (mWindow != null && CarSeries.getSeries() == CarSeries.CAR_SERIES_F80X) {
val lp = mWindow.attributes
lp.width = 1920
lp.height = 1080
mWindow.attributes = lp
}else{
val lp = mWindow.attributes
lp.width = 1024
lp.height = 600
@@ -78,7 +85,7 @@ class AuthorizeDialog : BaseFloatDialog, View.OnClickListener, IVoiceCommandList
}
}
fun initViews() {
private fun initViews() {
Logger.d(TAG, "initView ")
AnalyticsUtil.track(AnalyticsUtil.INVOKE_TRACK_AUTHORIZE_SHOW)
init()

View File

@@ -3,13 +3,13 @@
<item android:state_pressed="true">
<shape>
<corners android:radius="@dimen/dp_59" />
<gradient android:endColor="#805CC1FF" android:startColor="#803E7FFC" />
<gradient android:angle="0" android:endColor="#805CC1FF" android:startColor="#80256BFF" />
</shape>
</item>
<item>
<shape>
<corners android:radius="@dimen/dp_59" />
<gradient android:endColor="#5CC1FF" android:startColor="#3E7FFC" />
<gradient android:angle="0" android:endColor="#5CC1FF" android:startColor="#256BFF" />
</shape>
</item>
</selector>

View File

@@ -3,13 +3,13 @@
<item android:state_pressed="true">
<shape>
<corners android:bottomLeftRadius="@dimen/dp_30" />
<gradient android:endColor="#805CC1FF" android:startColor="#803E7FFC" />
<gradient android:endColor="#805CC1FF" android:startColor="#80256BFF" />
</shape>
</item>
<item>
<shape>
<corners android:bottomLeftRadius="@dimen/dp_30" />
<gradient android:endColor="#5CC1FF" android:startColor="#3E7FFC" />
<gradient android:endColor="#5CC1FF" android:startColor="#256BFF" />
</shape>
</item>
</selector>

View File

@@ -2,6 +2,7 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="@dimen/dp_30" />
<gradient
android:angle="135"
android:endColor="#3F4057"
android:startColor="#50526E " />
android:startColor="#2A2B38 " />
</shape>

View File

@@ -1,7 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:topLeftRadius="@dimen/dp_30" android:topRightRadius="@dimen/dp_30" />
<gradient
android:endColor="#2A2B38"
android:startColor="#3F4057" />
</shape>

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape>
<corners android:radius="@dimen/dp_45" />
<gradient android:angle="0" android:endColor="#805CC1FF" android:startColor="#80256BFF" />
</shape>
</item>
<item>
<shape>
<corners android:radius="@dimen/dp_45" />
<gradient android:angle="0" android:endColor="#5CC1FF" android:startColor="#256BFF" />
</shape>
</item>
</selector>

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape>
<corners android:bottomLeftRadius="@dimen/dp_30" />
<gradient android:endColor="#805CC1FF" android:startColor="#80256BFF" />
</shape>
</item>
<item>
<shape>
<corners android:bottomLeftRadius="@dimen/dp_30" />
<gradient android:endColor="#5CC1FF" android:startColor="#256BFF" />
</shape>
</item>
</selector>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="@dimen/dp_30" />
<gradient
android:angle="135"
android:endColor="#3F4057"
android:startColor="#2A2B38 " />
</shape>

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape>
<corners android:bottomRightRadius="@dimen/dp_30" />
<gradient android:endColor="#803F4057" android:startColor="#8050526E" />
</shape>
</item>
<item>
<shape>
<corners android:bottomRightRadius="@dimen/dp_30" />
<gradient android:endColor="#3F4057" android:startColor="#50526E " />
</shape>
</item>
</selector>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners
android:topLeftRadius="@dimen/dp_30"
android:topRightRadius="@dimen/dp_30" />
<gradient
android:angle="135"
android:endColor="#19757DB9"
android:startColor="#19525681" />
</shape>

View File

@@ -2,14 +2,14 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape>
<corners android:radius="@dimen/dp_59" />
<gradient android:endColor="#805CC1FF" android:startColor="#803E7FFC" />
<corners android:radius="@dimen/dp_45" />
<gradient android:angle="0" android:endColor="#805CC1FF" android:startColor="#80256BFF" />
</shape>
</item>
<item>
<shape>
<corners android:radius="@dimen/dp_59" />
<gradient android:endColor="#5CC1FF" android:startColor="#3E7FFC" />
<corners android:radius="@dimen/dp_45" />
<gradient android:angle="0" android:endColor="#5CC1FF" android:startColor="#256BFF" />
</shape>
</item>
</selector>

View File

@@ -3,13 +3,13 @@
<item android:state_pressed="true">
<shape>
<corners android:bottomLeftRadius="@dimen/dp_22" />
<gradient android:endColor="#805CC1FF" android:startColor="#803E7FFC" />
<gradient android:endColor="#805CC1FF" android:startColor="#80256BFF" />
</shape>
</item>
<item>
<shape>
<corners android:bottomLeftRadius="@dimen/dp_22" />
<gradient android:endColor="#5CC1FF" android:startColor="#3E7FFC" />
<gradient android:endColor="#5CC1FF" android:startColor="#256BFF" />
</shape>
</item>
</selector>

View File

@@ -2,6 +2,7 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="@dimen/dp_22" />
<gradient
android:angle="135"
android:endColor="#3F4057"
android:startColor="#50526E " />
android:startColor="#2A2B38" />
</shape>

View File

@@ -1,7 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:topLeftRadius="@dimen/dp_22" android:topRightRadius="@dimen/dp_22" />
<gradient
android:endColor="#2A2B38"
android:startColor="#3F4057" />
</shape>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners
android:topLeftRadius="@dimen/dp_22"
android:topRightRadius="@dimen/dp_22" />
<gradient
android:angle="135"
android:endColor="#19757DB9"
android:startColor="#19525681" />
</shape>

View File

@@ -207,4 +207,4 @@
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -0,0 +1,236 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/clAuthorizeTopParent"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/module_authorize_color">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/clLoadingAuthorizeContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/dp_275"
android:layout_marginTop="@dimen/dp_125"
android:layout_marginRight="@dimen/dp_275"
android:layout_marginBottom="@dimen/dp_125"
android:background="@drawable/module_authorize_selector_dark_corner"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/clAuthorizeLoading"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:id="@+id/ivAuthorizeLoading"
android:layout_width="@dimen/dp_147"
android:layout_height="@dimen/dp_147"
android:src="@mipmap/module_authorize_loading"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tvAuthorizeLoading"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_44"
android:text="@string/module_authorize_agreement_loading"
android:textColor="@color/module_authorize_loading_text"
android:textSize="@dimen/dp_31"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/ivAuthorizeLoading" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/clLoadingErrorContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/dp_275"
android:layout_marginTop="@dimen/dp_125"
android:layout_marginRight="@dimen/dp_275"
android:layout_marginBottom="@dimen/dp_125"
android:background="@drawable/module_authorize_selector_dark_corner"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<Button
android:id="@+id/btnAuthorizeLoadingError"
android:layout_width="@dimen/dp_282"
android:layout_height="@dimen/dp_90"
android:layout_marginTop="@dimen/dp_71"
android:background="@drawable/module_authorize_selector_blue_corner"
android:gravity="center"
android:text="@string/module_authorize_agreement_retry"
android:textColor="@android:color/white"
android:textSize="@dimen/dp_34"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tvAuthorizeLoadingError" />
<ImageView
android:id="@+id/ivAuthorizeLoadingError"
android:layout_width="@dimen/dp_94"
android:layout_height="@dimen/dp_94"
android:layout_marginTop="@dimen/dp_254"
android:src="@mipmap/module_authorize_loading_error"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tvAuthorizeLoadingError"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_20"
android:text="@string/module_authorize_agreement_error"
android:textColor="@color/module_authorize_text"
android:textSize="@dimen/dp_32"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/ivAuthorizeLoadingError" />
</androidx.constraintlayout.widget.ConstraintLayout>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/clAuthorizeContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/dp_275"
android:layout_marginTop="@dimen/dp_125"
android:layout_marginRight="@dimen/dp_275"
android:layout_marginBottom="@dimen/dp_125"
android:background="@drawable/module_authorize_selector_dark_corner"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<Button
android:id="@+id/btnAuthorizeAgree"
android:layout_width="0px"
android:layout_height="@dimen/dp_156"
android:background="@drawable/module_authorize_selector_blue_left_corner"
android:gravity="center"
android:text="@string/module_authorize_agreement_agree"
android:textColor="@color/module_authorize_affirm_text"
android:textSize="@dimen/dp_55"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_weight="1"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@+id/btnAuthorizeDisAgree" />
<Button
android:id="@+id/btnAuthorizeDisAgree"
android:layout_width="0px"
android:layout_height="@dimen/dp_156"
android:background="@drawable/module_authorize_selector_dark_right_corner"
android:gravity="center"
android:text="@string/module_authorize_agreement_disagree"
android:textColor="@color/module_authorize_text"
android:textSize="@dimen/dp_55"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_weight="1"
app:layout_constraintLeft_toRightOf="@+id/btnAuthorizeAgree"
app:layout_constraintRight_toRightOf="parent" />
<ScrollView
android:layout_width="0px"
android:layout_height="0px"
android:scrollbarSize="@dimen/dp_207"
android:scrollbarThumbVertical="@drawable/module_authorize_scrollbar"
android:scrollbarTrackHorizontal="@drawable/module_authorize_scrollbar"
app:layout_constraintBottom_toTopOf="@+id/btnAuthorizeDisAgree"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/clAuthorizeTitle">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/dp_38"
android:layout_marginLeft="@dimen/dp_55"
android:layout_marginRight="@dimen/dp_55"
android:orientation="vertical">
<TextView
android:id="@+id/tvAuthorizeContent"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:lineSpacingExtra="@dimen/dp_15"
android:textColor="@color/module_authorize_text"
android:textSize="@dimen/dp_44" />
<TextView
android:id="@+id/tvAuthorizeButtonContent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:textColor="@color/module_authorize_text"
android:textSize="@dimen/dp_44" />
<TextView
android:id="@+id/tvAuthorizeLastContent"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="@dimen/dp_15"
android:textColor="@color/module_authorize_text"
android:textSize="@dimen/dp_44" />
</LinearLayout>
</ScrollView>
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/clAuthorizeTitle"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_130"
android:background="@drawable/module_authorize_shape_top_corner"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:layout_width="@dimen/dp_32"
android:layout_height="@dimen/dp_32"
android:layout_marginLeft="@dimen/dp_438"
android:layout_marginTop="@dimen/dp_49"
android:src="@mipmap/module_authorize_title_left_symbol"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:layout_width="@dimen/dp_32"
android:layout_height="@dimen/dp_32"
android:layout_marginTop="@dimen/dp_49"
android:layout_marginRight="@dimen/dp_438"
android:src="@mipmap/module_authorize_title_right_symbol"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tvAuthorizeTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_34"
android:textColor="@color/module_authorize_text"
android:textSize="@dimen/dp_44"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

View File

@@ -4,16 +4,16 @@
android:id="@+id/clAuthorizeTopParent"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#CC000000">
android:background="@color/module_authorize_color">
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/clLoadingAuthorizeContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/dp_330"
android:layout_marginTop="@dimen/dp_90"
android:layout_marginRight="@dimen/dp_330"
android:layout_marginBottom="@dimen/dp_90"
android:layout_marginLeft="@dimen/dp_275"
android:layout_marginTop="@dimen/dp_125"
android:layout_marginRight="@dimen/dp_275"
android:layout_marginBottom="@dimen/dp_125"
android:background="@drawable/module_authorize_selector_dark_corner"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
@@ -43,8 +43,8 @@
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_44"
android:text="@string/module_authorize_agreement_loading"
android:textColor="#99FFFFFF"
android:textSize="@dimen/dp_44"
android:textColor="@color/module_authorize_loading_text"
android:textSize="@dimen/dp_31"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/ivAuthorizeLoading" />
@@ -57,10 +57,10 @@
android:id="@+id/clLoadingErrorContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/dp_330"
android:layout_marginTop="@dimen/dp_90"
android:layout_marginRight="@dimen/dp_330"
android:layout_marginBottom="@dimen/dp_90"
android:layout_marginLeft="@dimen/dp_275"
android:layout_marginTop="@dimen/dp_125"
android:layout_marginRight="@dimen/dp_275"
android:layout_marginBottom="@dimen/dp_125"
android:background="@drawable/module_authorize_selector_dark_corner"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
@@ -69,22 +69,22 @@
<Button
android:id="@+id/btnAuthorizeLoadingError"
android:layout_width="@dimen/dp_461"
android:layout_height="@dimen/dp_97"
android:layout_marginTop="@dimen/dp_33"
android:layout_width="@dimen/dp_282"
android:layout_height="@dimen/dp_90"
android:layout_marginTop="@dimen/dp_71"
android:background="@drawable/module_authorize_selector_blue_corner"
android:gravity="center"
android:text="@string/module_authorize_agreement_retry"
android:textColor="@android:color/white"
android:textSize="@dimen/dp_44"
android:textSize="@dimen/dp_34"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tvAuthorizeLoadingError" />
<ImageView
android:id="@+id/ivAuthorizeLoadingError"
android:layout_width="@dimen/dp_147"
android:layout_height="@dimen/dp_147"
android:layout_width="@dimen/dp_94"
android:layout_height="@dimen/dp_94"
android:layout_marginTop="@dimen/dp_254"
android:src="@mipmap/module_authorize_loading_error"
app:layout_constraintEnd_toEndOf="parent"
@@ -95,10 +95,10 @@
android:id="@+id/tvAuthorizeLoadingError"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_33"
android:layout_marginTop="@dimen/dp_20"
android:text="@string/module_authorize_agreement_error"
android:textColor="@android:color/white"
android:textSize="@dimen/dp_44"
android:textColor="@color/module_authorize_text"
android:textSize="@dimen/dp_32"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/ivAuthorizeLoadingError" />
@@ -108,10 +108,10 @@
android:id="@+id/clAuthorizeContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginLeft="@dimen/dp_330"
android:layout_marginTop="@dimen/dp_90"
android:layout_marginRight="@dimen/dp_330"
android:layout_marginBottom="@dimen/dp_90"
android:layout_marginLeft="@dimen/dp_275"
android:layout_marginTop="@dimen/dp_125"
android:layout_marginRight="@dimen/dp_275"
android:layout_marginBottom="@dimen/dp_125"
android:background="@drawable/module_authorize_selector_dark_corner"
android:visibility="gone"
app:layout_constraintEnd_toEndOf="parent"
@@ -125,7 +125,7 @@
android:background="@drawable/module_authorize_selector_blue_left_corner"
android:gravity="center"
android:text="@string/module_authorize_agreement_agree"
android:textColor="@android:color/white"
android:textColor="@color/module_authorize_affirm_text"
android:textSize="@dimen/dp_55"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_weight="1"
@@ -139,7 +139,7 @@
android:background="@drawable/module_authorize_selector_dark_right_corner"
android:gravity="center"
android:text="@string/module_authorize_agreement_disagree"
android:textColor="@android:color/white"
android:textColor="@color/module_authorize_text"
android:textSize="@dimen/dp_55"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintHorizontal_weight="1"
@@ -149,19 +149,18 @@
<ScrollView
android:layout_width="0px"
android:layout_height="0px"
android:layout_marginBottom="@dimen/dp_160"
android:scrollbarSize="@dimen/dp_207"
android:layout_marginTop="@dimen/dp_54"
android:scrollbarTrackHorizontal="@drawable/module_authorize_scrollbar"
android:scrollbarThumbVertical="@drawable/module_authorize_scrollbar"
app:layout_constraintBottom_toBottomOf="parent"
android:scrollbarTrackHorizontal="@drawable/module_authorize_scrollbar"
app:layout_constraintBottom_toTopOf="@+id/btnAuthorizeDisAgree"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toBottomOf="@+id/tvAuthorizeTitle">
app:layout_constraintTop_toBottomOf="@+id/clAuthorizeTitle">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_marginTop="@dimen/dp_38"
android:layout_marginLeft="@dimen/dp_55"
android:layout_marginRight="@dimen/dp_55"
android:orientation="vertical">
@@ -171,7 +170,7 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:lineSpacingExtra="@dimen/dp_15"
android:textColor="@android:color/white"
android:textColor="@color/module_authorize_text"
android:textSize="@dimen/dp_44" />
<TextView
@@ -179,7 +178,7 @@
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:textColor="@android:color/white"
android:textColor="@color/module_authorize_text"
android:textSize="@dimen/dp_44" />
<TextView
@@ -188,23 +187,50 @@
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="@dimen/dp_15"
android:textColor="@android:color/white"
android:textColor="@color/module_authorize_text"
android:textSize="@dimen/dp_44" />
</LinearLayout>
</ScrollView>
<TextView
android:id="@+id/tvAuthorizeTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_62"
android:textColor="@android:color/white"
android:textSize="@dimen/dp_55"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<androidx.constraintlayout.widget.ConstraintLayout
android:id="@+id/clAuthorizeTitle"
android:layout_width="match_parent"
android:layout_height="@dimen/dp_130"
android:background="@drawable/module_authorize_shape_top_corner"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent">
<ImageView
android:layout_width="@dimen/dp_32"
android:layout_height="@dimen/dp_32"
android:layout_marginLeft="@dimen/dp_438"
android:layout_marginTop="@dimen/dp_49"
android:src="@mipmap/module_authorize_title_left_symbol"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:layout_width="@dimen/dp_32"
android:layout_height="@dimen/dp_32"
android:layout_marginTop="@dimen/dp_49"
android:layout_marginRight="@dimen/dp_438"
android:src="@mipmap/module_authorize_title_right_symbol"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<TextView
android:id="@+id/tvAuthorizeTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="@dimen/dp_34"
android:textColor="@color/module_authorize_text"
android:textSize="@dimen/dp_44"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</androidx.constraintlayout.widget.ConstraintLayout>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 623 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="module_authorize_loading_text">#99FFFFFF</color>
<color name="module_authorize_text">#FFFFFF</color>
<color name="module_authorize_affirm_text">#FFFFFF</color>
<color name="module_authorize_color">#7F000000</color>
</resources>

View File

@@ -5,7 +5,7 @@
<item name="android:windowFrame">@null</item>
<item name="android:windowNoTitle">true</item>
<item name="android:windowBackground">@android:color/transparent</item>
<item name="android:backgroundDimAmount">0.85</item>
<item name="android:backgroundDimAmount">0.4</item>
<item name="android:backgroundDimEnabled">true</item>
<item name="android:windowContentOverlay">@null</item>
<item name="android:fullBright">@android:color/transparent</item>

View File

@@ -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<>();

View File

@@ -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

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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="去分享"

View File

@@ -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>

View File

@@ -31,6 +31,8 @@ android {
res.srcDirs = [
'src/main/res',
'src/main/module-apps-res',
'src/main/module-authorize-res',
'src/main/module-callchat-res',
'src/main/module-extensions-res',
'src/main/module-v2x-res',
'src/main/module-back-res',

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape>
<solid android:color="#21000000"/>
<corners android:bottomLeftRadius="@dimen/dp_30" />
</shape>
</item>
<item>
<shape>
<solid android:color="#FFFFFF"/>
<corners android:bottomLeftRadius="@dimen/dp_30" />
</shape>
</item>
</selector>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="@dimen/dp_30" />
<gradient
android:angle="135"
android:endColor="#E5F5F5F5"
android:startColor="#FFFFFF" />
</shape>

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape>
<corners android:bottomRightRadius="@dimen/dp_30" />
<solid android:color="#21000000" />
</shape>
</item>
<item>
<shape>
<corners android:bottomRightRadius="@dimen/dp_30" />
<solid android:color="#E8E8E8" />
</shape>
</item>
</selector>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners
android:topLeftRadius="@dimen/dp_30"
android:topRightRadius="@dimen/dp_30" />
<gradient
android:angle="135"
android:endColor="#19A5A5A5"
android:startColor="#19777777" />
</shape>

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape>
<solid android:color="#21000000"/>
<corners android:bottomLeftRadius="@dimen/dp_22" />
</shape>
</item>
<item>
<shape>
<solid android:color="#FFFFFF"/>
<corners android:bottomLeftRadius="@dimen/dp_22" />
</shape>
</item>
</selector>

View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners android:radius="@dimen/dp_22" />
<gradient
android:angle="135"
android:endColor="#E5F5F5F5"
android:startColor="#FFFFFF" />
</shape>

View File

@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true">
<shape>
<corners android:bottomRightRadius="@dimen/dp_22" />
<solid android:color="#21000000" />
</shape>
</item>
<item>
<shape>
<corners android:bottomRightRadius="@dimen/dp_22" />
<solid android:color="#E8E8E8" />
</shape>
</item>
</selector>

View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<corners
android:topLeftRadius="@dimen/dp_22"
android:topRightRadius="@dimen/dp_22" />
<gradient
android:angle="135"
android:endColor="#19A5A5A5"
android:startColor="#19777777" />
</shape>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 796 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 779 B

View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="module_authorize_loading_text_light">#333333</color>
<color name="module_authorize_text_light">#333333</color>
<color name="module_authorize_affirm_text_light">#2896FF</color>
<color name="module_authorize_color_light">#4c000000</color>
</resources>

Binary file not shown.

After

Width:  |  Height:  |  Size: 886 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.5 KiB

View File

@@ -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>