Merge remote-tracking branch 'origin/dev_minibus-d_230425_3.2.0' into dev_minibus-d_230425_3.2.0

This commit is contained in:
yangyakun
2023-05-15 18:14:15 +08:00
8 changed files with 51 additions and 209 deletions

View File

@@ -56,6 +56,9 @@ class MapAndLiveVideoView @JvmOverloads constructor(
}
fun changeToSecondView(){
if (viewPager?.currentItem == 0){
startPosition = 0
}
viewPager?.currentItem = 1
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 555 KiB

After

Width:  |  Height:  |  Size: 354 KiB

View File

@@ -8,12 +8,13 @@
android:layout_marginBottom="@dimen/dp_40"
app:roundLayoutRadius="@dimen/dp_40">
<View
<androidx.appcompat.widget.AppCompatImageView
android:layout_width="@dimen/bus_p_route_info_panel_width"
android:layout_height="match_parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:background="@drawable/bus_p_route_bg"/>
android:src="@drawable/bus_p_route_bg"
android:scaleType="fitXY"/>
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="@dimen/bus_p_route_info_panel_width"

View File

@@ -21,19 +21,19 @@ import com.mogo.och.common.module.R;
* desc :
* version: 1.0
*/
public class OCHRoundConstraintLayout extends ConstraintLayout implements GestureDetector.OnGestureListener {
public class OCHRoundConstraintLayout extends ConstraintLayout {
private float roundLayoutRadius = 14f;
private Path roundPath;
private RectF rectF;
// 上次滑动的坐标
private int mLastXIntercept;
private int mLastYIntercept;
// private int mLastXIntercept;
// private int mLastYIntercept;
private IScrollListener mScrollListener;
private GestureDetector mDetector;
// private GestureDetector mDetector;
public OCHRoundConstraintLayout(Context context) {
this(context, null);
@@ -57,7 +57,7 @@ public class OCHRoundConstraintLayout extends ConstraintLayout implements Gestur
setWillNotDraw(false);//如果你继承的是ViewGroup,注意此行,否则draw方法是不会回调的;
roundPath = new Path();
rectF = new RectF();
mDetector = new GestureDetector(getContext(), this);
// mDetector = new GestureDetector(getContext(), this);
}
private void setRoundPath() {
@@ -92,72 +92,42 @@ public class OCHRoundConstraintLayout extends ConstraintLayout implements Gestur
super.draw(canvas);
}
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
boolean intercepted = false;
int x = (int) ev.getX();
int y = (int) ev.getY();
switch (ev.getAction()) {
case MotionEvent.ACTION_MOVE:
int deltaX = x - mLastXIntercept;
int deltaY = y - mLastYIntercept;
if (Math.abs(deltaX) > Math.abs(deltaY)) {
intercepted = true;
}
break;
default:
break;
}
mLastXIntercept = x;
mLastYIntercept = y;
return intercepted;
}
// @Override
// public boolean onDown(MotionEvent e) {
// return true;
// }
//
// @Override
// public void onShowPress(MotionEvent e) {
// }
@Override
public boolean onTouchEvent(MotionEvent event) {
if (mDetector != null) {
return mDetector.onTouchEvent(event);
} else {
return super.onTouchEvent(event);
}
}
// @Override
// public boolean onSingleTapUp(MotionEvent e) {
// return true;
// }
//
// @Override
// public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) {
// return true;
// }
@Override
public boolean onDown(MotionEvent e) {
return true;
}
@Override
public void onShowPress(MotionEvent e) {
}
@Override
public boolean onSingleTapUp(MotionEvent e) {
return true;
}
@Override
public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) {
return true;
}
@Override
public void onLongPress(MotionEvent e) {
}
@Override
public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {
if (e2 != null) {
float deltaX = e2.getX() - (e1 != null ? e1.getX() : 0f);
float deltaY = e2.getY() - (e1 != null ? e1.getY() : 0f);
if (Math.abs(deltaX) > Math.abs(deltaY)) {
if (mScrollListener != null) {
mScrollListener.onScroll(velocityX < 0);
}
}
}
return true;
}
// @Override
// public void onLongPress(MotionEvent e) {
// }
//
// @Override
// public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {
// if (e2 != null) {
// float deltaX = e2.getX() - (e1 != null ? e1.getX() : 0f);
// float deltaY = e2.getY() - (e1 != null ? e1.getY() : 0f);
// if (Math.abs(deltaX) > Math.abs(deltaY)) {
// if (mScrollListener != null) {
// mScrollListener.onScroll(velocityX < 0);
// }
// }
// }
// return true;
// }
public interface IScrollListener {
void onScroll(boolean isNextPage);

View File

@@ -35,7 +35,7 @@ class BusPStatusBarView @JvmOverloads constructor(
init {
LayoutInflater.from(context).inflate(R.layout.p_bus_view_status_bar, this, true)
setBackgroundColor(Color.parseColor("#80FFFFFF"))
setBackgroundResource(R.drawable.bg_status_bar)
isClickable = true
isFocusable = true
}

View File

@@ -2,7 +2,8 @@
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient android:startColor="@android:color/white"
android:centerColor="#00FFFFFF"
android:endColor="#00FFFFFF"
android:angle="315"
android:angle="0"
/>
</shape>

View File

@@ -27,55 +27,20 @@
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent" />
<!-- <com.mogo.eagle.core.function.hmi.ui.widget.SteeringWheelView-->
<!-- android:id="@+id/steering_wheel"-->
<!-- android:layout_width="@dimen/dp_490"-->
<!-- android:layout_height="@dimen/dp_490"-->
<!-- android:layout_marginLeft="@dimen/dp_50"-->
<!-- android:layout_marginTop="@dimen/dp_88"-->
<!-- app:layout_constraintLeft_toLeftOf="parent"-->
<!-- app:layout_constraintTop_toTopOf="parent" />-->
<!-- <ImageView-->
<!-- android:id="@+id/bus_p_autopilot_iv"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_marginLeft="@dimen/bus_p_curent_station_panel_margin"-->
<!-- android:layout_marginTop="@dimen/dp_112"-->
<!-- android:scaleType="fitXY"-->
<!-- android:visibility="gone"-->
<!-- android:layout_gravity="center_horizontal"-->
<!-- android:src="@drawable/bus_p_un_auto_nor"-->
<!-- app:layout_constraintLeft_toLeftOf="parent"-->
<!-- app:layout_constraintTop_toTopOf="parent"/>-->
<!--浓雾预警动画-->
<com.mogo.eagle.core.function.hmi.ui.widget.V2XFogEventView
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<!-- <com.mogo.eagle.core.function.hmi.ui.widget.RomaPassengerView-->
<!-- android:id="@+id/ivMoGoLogo"-->
<!-- android:layout_width="@dimen/dp_121"-->
<!-- android:layout_height="@dimen/dp_121"-->
<!-- android:layout_marginRight="@dimen/dp_751"-->
<!-- android:layout_marginBottom="@dimen/dp_59"-->
<!-- android:background="@drawable/roma_bus_p_bg_selector"-->
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
<!-- app:layout_constraintRight_toRightOf="parent"-->
<!-- app:roma_close="@drawable/roma_bus_p_bg_selector"-->
<!-- app:roma_open="@drawable/iv_roma_bus_passenger_press_bg" />-->
<com.mogo.eagle.core.function.hmi.ui.widget.RomaPassengerView
android:id="@+id/ivMoGoLogo"
android:layout_width="@dimen/dp_121"
android:layout_height="@dimen/dp_121"
android:layout_marginRight="@dimen/dp_751"
android:layout_marginBottom="@dimen/dp_59"
android:layout_marginBottom="@dimen/dp_40"
android:background="@drawable/roma_bus_p_bg_selector"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:roma_close="@drawable/roma_bus_p_bg_selector"
app:roma_open="@drawable/iv_roma_bus_passenger_press_bg" />
@@ -89,95 +54,6 @@
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintTop_toTopOf="parent"/>
<!-- <com.mogo.och.common.module.wigets.OCHBorderShadowLayout-->
<!-- android:id="@+id/arrive_station_shadow"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_marginLeft="@dimen/bus_p_curent_station_panel_margin_left"-->
<!-- android:layout_marginBottom="@dimen/bus_p_curent_station_panel_margin"-->
<!-- app:bgColor="@android:color/transparent"-->
<!-- app:blurRadius="@dimen/dp_30"-->
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
<!-- app:layout_constraintLeft_toLeftOf="parent"-->
<!-- app:shadowColor="@color/bus_p_panel_edge_shadow"-->
<!-- app:shadowRadius="@dimen/dp_30"-->
<!-- app:xOffset="0dp"-->
<!-- app:yOffset="0dp">-->
<!-- <androidx.constraintlayout.widget.ConstraintLayout-->
<!-- android:layout_width="@dimen/bus_p_curent_station_panel_width"-->
<!-- android:layout_height="@dimen/bus_p_curent_station_panel_height"-->
<!-- android:layout_margin="@dimen/dp_10"-->
<!-- android:background="@drawable/bus_p_panel_cur_station_panel">-->
<!-- <TextView-->
<!-- android:id="@+id/bus_p_cur_station_title"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_marginLeft="@dimen/dp_56"-->
<!-- android:layout_marginTop="@dimen/dp_40"-->
<!-- android:elevation="@dimen/dp_10"-->
<!-- android:text="@string/bus_p_cur_station_title"-->
<!-- android:textColor="@color/bus_p_panel_cur_txt_color"-->
<!-- android:textSize="@dimen/bus_p_curent_station_txt_size"-->
<!-- android:textStyle="bold"-->
<!-- app:layout_constraintLeft_toLeftOf="parent"-->
<!-- app:layout_constraintTop_toTopOf="parent" />-->
<!-- <TextView-->
<!-- android:id="@+id/bus_p_cur_station_name"-->
<!-- android:layout_width="@dimen/bus_p_curent_station_txt_width"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_marginTop="@dimen/dp_12"-->
<!-- android:elevation="@dimen/dp_10"-->
<!-- android:ellipsize="end"-->
<!-- android:maxLines="1"-->
<!-- android:text="&#45;&#45; &#45;&#45;"-->
<!-- android:textColor="@color/bus_p_panel_cur_station_txt_color"-->
<!-- android:textSize="@dimen/bus_p_curent_station_txt_size1"-->
<!-- android:textStyle="bold"-->
<!-- app:layout_constraintLeft_toLeftOf="@+id/bus_p_cur_station_title"-->
<!-- app:layout_constraintTop_toBottomOf="@+id/bus_p_cur_station_title" />-->
<!-- <androidx.appcompat.widget.AppCompatImageView-->
<!-- android:layout_width="@dimen/dp_20"-->
<!-- android:layout_height="@dimen/dp_27"-->
<!-- app:layout_constraintTop_toTopOf="@+id/bus_p_cur_station_name"-->
<!-- app:layout_constraintBottom_toBottomOf="@+id/bus_p_cur_station_name"-->
<!-- app:layout_constraintRight_toLeftOf="@+id/bus_p_cur_station_name"-->
<!-- android:layout_marginRight="@dimen/dp_10"-->
<!-- android:src="@drawable/station_arrow">-->
<!-- </androidx.appcompat.widget.AppCompatImageView>-->
<!-- <TextView-->
<!-- android:id="@+id/bus_p_cur_station_tip"-->
<!-- android:layout_width="wrap_content"-->
<!-- android:layout_height="wrap_content"-->
<!-- android:layout_marginTop="@dimen/dp_20"-->
<!-- android:elevation="@dimen/dp_10"-->
<!-- android:text="@string/bus_p_cur_station_arrived_tip"-->
<!-- android:textColor="@color/bus_p_panel_cur_station_tips_color"-->
<!-- android:textSize="@dimen/bus_p_curent_station_tip_size1"-->
<!-- android:textStyle="bold"-->
<!-- app:layout_constraintLeft_toLeftOf="@+id/bus_p_cur_station_name"-->
<!-- app:layout_constraintTop_toBottomOf="@+id/bus_p_cur_station_name" />-->
<!-- <androidx.core.widget.ContentLoadingProgressBar-->
<!-- android:id="@+id/bus_progress_bar"-->
<!-- android:layout_width="0dp"-->
<!-- android:layout_height="@dimen/dp_10"-->
<!-- android:progress="0"-->
<!-- style="@style/Widget.AppCompat.ProgressBar.Horizontal"-->
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
<!-- app:layout_constraintLeft_toLeftOf="parent"-->
<!-- android:layout_marginLeft="@dimen/dp_12"-->
<!-- android:layout_marginRight="@dimen/dp_15"-->
<!-- app:layout_constraintRight_toRightOf="parent"-->
<!-- android:progressDrawable="@drawable/bus_progress_bar_bg" />-->
<!-- </androidx.constraintlayout.widget.ConstraintLayout>-->
<!-- </com.mogo.och.common.module.wigets.OCHBorderShadowLayout>-->
<FrameLayout
android:id="@+id/bus_p_route_panel"
android:layout_width="wrap_content"
@@ -185,15 +61,6 @@
app:layout_constraintRight_toRightOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<!-- <ImageView-->
<!-- android:layout_width="@dimen/dp_299"-->
<!-- android:layout_height="@dimen/dp_75"-->
<!-- android:layout_marginRight="@dimen/dp_40"-->
<!-- android:layout_marginBottom="@dimen/dp_48"-->
<!-- android:src="@drawable/bus_p_mogo_nor"-->
<!-- app:layout_constraintBottom_toBottomOf="parent"-->
<!-- app:layout_constraintRight_toLeftOf="@+id/bus_p_route_panel" />-->
<com.mogo.eagle.core.function.hmi.ui.msgbox.BusPassengerMsgBoxBubbleView
android:layout_width="wrap_content"
android:layout_height="wrap_content"

View File

@@ -36,7 +36,7 @@ project.android.productFlavors {
}
if(isJL()){
// ③是否需要重写状态栏
buildConfigField 'boolean', 'IS_REPLACE_STATUSVIEW', 'false'
buildConfigField 'boolean', 'IS_REPLACE_STATUSVIEW', 'true'
// ④构建 是否支持多屏异显异交互
buildConfigField 'boolean', 'IS_MULTI_DISPLAY', 'true'
manifestPlaceholders.put("SCREEN_ORIENTATION", "landscape")