This commit is contained in:
wangcongtao
2020-04-23 19:18:10 +08:00
parent 493ec9dab1
commit 9974ea1f28
90 changed files with 165 additions and 34 deletions

View File

@@ -66,7 +66,7 @@ MOGO_MODULE_GUIDESHOW_PROVIDER_VERSION=1.0.2-SNAPSHOT
# 在线车辆F
MOGO_MODULE_ONLINECAR_VERSION=1.0.3.1
# v2x
MOGO_MODULE_V2X_VERSION=1.0.3.3-SNAPSHOT
MOGO_MODULE_V2X_VERSION=1.0.3.6
# 媒体卡片
MOGO_MODULE_MEDIA_VERSION=1.0.4.3
# 推送

View File

@@ -8,6 +8,7 @@ import android.os.Message;
import android.util.Log;
import android.view.MotionEvent;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;
import androidx.annotation.DrawableRes;
@@ -82,7 +83,9 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
private View mHome;
private View mCompany;
private TextView mUploadRoadCondition;
private View mUploadRoadCondition;
private TextView mUpload;
private ImageView mUploading;
private View mVRMode;
private View mMove2CurrentLocation;
@@ -119,21 +122,52 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
@DrawableRes
private int[] mUploadingFrameRes = {
R.drawable.amap_route_color_texture_0_arrow,
R.drawable.amap_route_color_texture_1_arrow,
R.drawable.amap_route_color_texture_2_arrow,
R.drawable.amap_route_color_texture_3_arrow,
R.drawable.amap_route_color_texture_4_arrow,
R.drawable.amap_route_color_texture_5_arrow,
R.drawable.amap_route_color_texture_6_arrow,
R.drawable.amap_route_color_texture_7_arrow,
R.drawable.amap_route_color_texture_8_arrow,
R.drawable.amap_route_color_texture_9_arrow,
R.drawable.module_ext_ic_uploading_00000,
R.drawable.module_ext_ic_uploading_00001,
R.drawable.module_ext_ic_uploading_00002,
R.drawable.module_ext_ic_uploading_00003,
R.drawable.module_ext_ic_uploading_00004,
R.drawable.module_ext_ic_uploading_00005,
R.drawable.module_ext_ic_uploading_00006,
R.drawable.module_ext_ic_uploading_00007,
R.drawable.module_ext_ic_uploading_00008,
R.drawable.module_ext_ic_uploading_00009,
R.drawable.module_ext_ic_uploading_00010,
R.drawable.module_ext_ic_uploading_00011,
R.drawable.module_ext_ic_uploading_00012,
R.drawable.module_ext_ic_uploading_00013,
R.drawable.module_ext_ic_uploading_00014,
R.drawable.module_ext_ic_uploading_00015,
R.drawable.module_ext_ic_uploading_00016,
R.drawable.module_ext_ic_uploading_00017,
R.drawable.module_ext_ic_uploading_00018,
R.drawable.module_ext_ic_uploading_00019,
R.drawable.module_ext_ic_uploading_00020,
R.drawable.module_ext_ic_uploading_00021,
R.drawable.module_ext_ic_uploading_00022,
R.drawable.module_ext_ic_uploading_00023,
R.drawable.module_ext_ic_uploading_00024,
R.drawable.module_ext_ic_uploading_00025,
R.drawable.module_ext_ic_uploading_00026,
R.drawable.module_ext_ic_uploading_00027,
R.drawable.module_ext_ic_uploading_00028,
R.drawable.module_ext_ic_uploading_00029,
R.drawable.module_ext_ic_uploading_00030,
R.drawable.module_ext_ic_uploading_00031,
R.drawable.module_ext_ic_uploading_00032,
R.drawable.module_ext_ic_uploading_00033,
R.drawable.module_ext_ic_uploading_00034,
R.drawable.module_ext_ic_uploading_00035,
R.drawable.module_ext_ic_uploading_00036,
R.drawable.module_ext_ic_uploading_00037,
R.drawable.module_ext_ic_uploading_00038,
R.drawable.module_ext_ic_uploading_00039,
R.drawable.module_ext_ic_uploading_00040
};
private int mCurrentUploadFrame = 0;
private Handler mUploadFrameAnimHandler;
public static final int MSG_FRAME_ANIM = 307;
public static final long TIME_FRAME_INTERVAL_TIME = 200;
public static final long TIME_FRAME_INTERVAL_TIME = 80;
@Override
protected int getLayoutId() {
@@ -174,6 +208,8 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
} );
mUploadRoadCondition = findViewById( R.id.module_entrance_id_upload_road_condition );
mUpload = findViewById( R.id.module_entrance_id_upload );
mUploading = findViewById( R.id.module_entrance_id_uploading );
mUploadRoadCondition.setOnClickListener( view -> {
isClickShare = true;
if ( mIMogoAuthorizeModuleManager.needAuthorize( AUTHORIZE_TYPE_LAUNCHER_SHARE ) ) {
@@ -472,11 +508,14 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
}
if ( descriptor == StatusDescriptor.UPLOADING ) {
if ( isTrue ) {
mUploading.setVisibility( View.VISIBLE );
mUpload.setVisibility( View.GONE );
doFrameAnimOnUploadButton();
} else {
mCurrentUploadFrame = 0;
mUploadFrameAnimHandler.removeMessages( MSG_FRAME_ANIM );
mUploadRoadCondition.setText( R.string.module_map_str_upload_road_condition );
mUploadRoadCondition.setBackgroundResource( R.drawable.module_ext_dw_upload_road_condition_bkg );
mUploading.setVisibility( View.GONE );
mUpload.setVisibility( View.VISIBLE );
}
}
}
@@ -489,17 +528,24 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
super.handleMessage( msg );
if ( msg.what == MSG_FRAME_ANIM ) {
if ( mUploadingFrameRes == null || mUploadingFrameRes.length == 0 ) {
if ( mUploading != null ) {
mUploading.setVisibility( View.GONE );
}
if ( mUpload != null ) {
mUpload.setVisibility( View.VISIBLE );
}
return;
}
if ( !mMogoStatusManager.isUploading() ) {
mCurrentUploadFrame = 0;
if ( mUploadRoadCondition != null ) {
mUploadRoadCondition.setText( R.string.module_map_str_upload_road_condition );
mUploadRoadCondition.setBackgroundResource( R.drawable.module_ext_dw_upload_road_condition_bkg );
}
return;
}
mUploadRoadCondition.setBackgroundResource( mUploadingFrameRes[mCurrentUploadFrame++ % mUploadingFrameRes.length] );
if ( mUploading != null ) {
if ( mCurrentUploadFrame == mUploadingFrameRes.length ) {
mCurrentUploadFrame = 12;
}
mUploading.setImageResource( mUploadingFrameRes[mCurrentUploadFrame++%mUploadingFrameRes.length] );
}
mUploadFrameAnimHandler.sendEmptyMessageDelayed( MSG_FRAME_ANIM, TIME_FRAME_INTERVAL_TIME );
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 162 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 338 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 484 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 587 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 685 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 765 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 888 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 975 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1010 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1010 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1013 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1010 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 986 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 992 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 986 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 975 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 989 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1009 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1020 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 179 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 485 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 794 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@@ -179,20 +179,36 @@
</LinearLayout>
</LinearLayout>
<TextView
<FrameLayout
android:id="@+id/module_entrance_id_upload_road_condition"
android:layout_width="@dimen/module_ext_operation_panel_share_width"
android:layout_height="@dimen/module_ext_operation_panel_share_height"
android:layout_marginBottom="@dimen/module_ext_operation_panel_share_marginBottom"
android:background="@drawable/module_ext_dw_upload_road_condition_bkg"
android:gravity="center"
android:text="@string/module_map_str_upload_road_condition"
android:textColor="#FFFFFF"
android:textSize="@dimen/module_ext_operation_panel_share_textSize"
app:layout_constraintBottom_toTopOf="@+id/module_entrance_id_operation_panel"
app:layout_constraintRight_toRightOf="@+id/module_entrance_id_operation_panel"
app:layout_goneMarginBottom="@dimen/module_ext_operation_panel_share_goneMarginBottom"
app:layout_goneMarginRight="@dimen/module_ext_operation_panel_share_goneMarginRight" />
app:layout_goneMarginRight="@dimen/module_ext_operation_panel_share_goneMarginRight"
android:layout_width="@dimen/module_ext_operation_panel_share_width"
android:layout_marginBottom="@dimen/module_ext_operation_panel_share_marginBottom"
android:layout_height="@dimen/module_ext_operation_panel_share_height">
<TextView
android:id="@+id/module_entrance_id_upload"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/module_ext_dw_upload_road_condition_bkg"
android:gravity="center"
android:text="@string/module_map_str_upload_road_condition"
android:textColor="#FFFFFF"
android:textSize="@dimen/module_ext_operation_panel_share_textSize" />
<ImageView
android:id="@+id/module_entrance_id_uploading"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:visibility="gone"
android:background="@drawable/module_ext_dw_upload_road_condition_bkg"
android:gravity="center"
android:text="@string/module_map_str_upload_road_condition"
android:textColor="#FFFFFF"
android:textSize="@dimen/module_ext_operation_panel_share_textSize" />
</FrameLayout>
<LinearLayout
android:id="@+id/module_entrance_id_buttons_container"

View File

@@ -66,6 +66,7 @@ public class MainPresenter extends Presenter< MainView > {
public MainPresenter( MainView view ) {
super( view );
mCardStartShowTime = System.currentTimeMillis();
SchemeIntent.getInstance().init( getContext(), mView.getApis() );
}
@Override
@@ -141,7 +142,6 @@ public class MainPresenter extends Presenter< MainView > {
}
public void handleSchemeIntent( Intent intent ) {
SchemeIntent.getInstance().init( getContext(), mView.getApis() );
SchemeIntent.getInstance().handle( intent );
}
}

View File

@@ -3,13 +3,19 @@ package com.mogo.module.main;
import android.content.Context;
import android.content.Intent;
import android.net.Uri;
import android.text.TextUtils;
import com.mogo.map.MogoLatLng;
import com.mogo.module.common.ModuleNames;
import com.mogo.module.main.livedata.CardInfo;
import com.mogo.module.main.livedata.CardSwitchLiveData;
import com.mogo.service.IMogoServiceApis;
import com.mogo.service.intent.IMogoIntentListener;
import com.mogo.service.intent.IMogoIntentManager;
import com.mogo.service.statusmanager.IMogoStatusChangedListener;
import com.mogo.service.statusmanager.StatusDescriptor;
import com.mogo.utils.TipToast;
import com.mogo.utils.UiThreadHandler;
import com.mogo.utils.logger.Logger;
/**
@@ -20,7 +26,7 @@ import com.mogo.utils.logger.Logger;
* <p>
* 导航adb shell am start -d "mogo://launcher/main/switch2?type=navi'&'lon=116.327007'&'lat=39.977639"
*/
public class SchemeIntent {
public class SchemeIntent implements IMogoStatusChangedListener {
private static final String TAG = "SchemeIntent";
@@ -29,6 +35,8 @@ public class SchemeIntent {
private IMogoServiceApis mApis;
private Context mContext;
private Intent mNextIntent;
private SchemeIntent() {
// private constructor
}
@@ -44,6 +52,7 @@ public class SchemeIntent {
public void init( Context context, IMogoServiceApis apis ) {
mContext = context;
mApis = apis;
mApis.getStatusManagerApi().registerStatusChangedListener( TAG, StatusDescriptor.MAIN_PAGE_RESUME, this );
}
private Object readResolve() {
@@ -60,15 +69,28 @@ public class SchemeIntent {
if ( path == null || path.isEmpty() ) {
return;
}
if ( !mApis.getStatusManagerApi().isMainPageOnResume() ) {
mNextIntent = intent;
mApis.getLauncherApi().backToLauncher( mContext );
return;
}
switch ( path ) {
case "/main/switch2":
handleSwitch2Action( target );
break;
}
mNextIntent = null;
}
private void handleSwitch2Action( Uri target ) {
String type = target.getQueryParameter( "type" );
if ( TextUtils.isEmpty( type ) ) {
return;
}
switch ( type ) {
case ModuleNames.CARD_TYPE_BUSINESS_OPERATION:
case ModuleNames.CARD_TYPE_CARS_CHATTING:
@@ -110,4 +132,16 @@ public class SchemeIntent {
Logger.e( TAG, e, "error." );
}
}
@Override
public void onStatusChanged( StatusDescriptor descriptor, boolean isTrue ) {
if ( descriptor == StatusDescriptor.MAIN_PAGE_RESUME ) {
if ( isTrue ) {
// 保证回到桌面后在开始该规划路线。
UiThreadHandler.postDelayed( () -> {
handle( mNextIntent );
}, 2_000L );
}
}
}
}

View File

@@ -199,6 +199,8 @@ public class MogoServices implements IMogoMapListener,
*/
private void invokeAutoRefresh() {
if ( mStatusManager.isSearchUIShow() || mStatusManager.isADASShow() ) {
mStatusManager.setUserInteractionStatus( TAG, true, false );
mUiController.recoverLockMode();
return;
}
mStatusManager.setUserInteractionStatus( ServiceConst.TYPE, true, false );
@@ -345,6 +347,9 @@ public class MogoServices implements IMogoMapListener,
Logger.i( TAG, "刷新半径 = %s, 点 = %s, zoomLevel = %s, amount = %s", ro.mRadius, ro.mLonLat, mLastZoomLevel, ro.mAmount );
}
} else if( msg.what == ServiceConst.MSG_LOCK_CAR ){
mStatusManager.setUserInteractionStatus( TAG, true, false );
mUiController.recoverLockMode();
}
}
};
@@ -465,7 +470,10 @@ public class MogoServices implements IMogoMapListener,
@Override
public void onLockMap( boolean isLock ) {
mThreadHandler.removeMessages( ServiceConst.MSG_LOCK_CAR );
if ( !isLock ) {
mThreadHandler.sendEmptyMessageDelayed( ServiceConst.MSG_LOCK_CAR, ServiceConst.DEFAULT_AUTO_REFRESH_WHEN_INTERRUPT );
}
}
@Override

View File

@@ -83,7 +83,7 @@ public class ServiceConst {
public static final int DEFAULT_AUTO_REFRESH_DATA_RADIUS = 2_000;
/**
* 30 s
* 20 s
*/
public static final int DEFAULT_AUTO_REFRESH_WHEN_INTERRUPT = 20 * 1_000;
@@ -107,6 +107,12 @@ public class ServiceConst {
*/
public static final int MSG_REQUEST_DATA = 0x201;
/**
*
* 锁车消息
*/
public static final int MSG_LOCK_CAR = 0x202;
/**
* 切换卡片内容-上一个

View File

@@ -3,6 +3,7 @@ package com.mogo.module.service.intent;
import android.content.Context;
import android.content.Intent;
import android.graphics.Color;
import android.net.Uri;
import android.text.TextUtils;
import android.view.View;
import android.widget.TextView;
@@ -64,6 +65,26 @@ public class MockIntentHandler implements IntentHandler {
boolean status1 = intent.getBooleanExtra( "status", false );
MarkerServiceHandler.getMogoStatusManager().setUploadingStatus( TAG, status1 );
break;
case 7:
TextView button11 = MarkerServiceHandler.getApis().getEntranceButtonController().getButton( ButtonIndex.BUTTON1 );
if ( button11 != null ) {
button11.setVisibility( View.VISIBLE );
button11.setBackgroundColor( Color.RED );
button11.setOnClickListener( view -> {
Intent intent1 = new Intent( );
intent1.setAction( Intent.ACTION_VIEW );
intent1.addFlags( Intent.FLAG_ACTIVITY_NEW_TASK );
intent1.setData( Uri.parse("wechathelper://com.zhidao.wechathelper/main/transform?type=navi&lon=116.327007&lat=39.977639&from=os2.0") );
try {
view.setOnClickListener( null );
view.getContext().startActivity( intent1 );
} catch ( Exception e ) {
e.printStackTrace();
}
view.setVisibility( View.GONE );
} );
}
break;
}
}
}