去掉调试相关代码,修改导航缩小后的图片大小
This commit is contained in:
@@ -199,25 +199,13 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
|
||||
mUpload = findViewById( R.id.module_entrance_id_upload );
|
||||
mUploading = findViewById( R.id.module_entrance_id_uploading );
|
||||
mUploadRoadCondition.setOnClickListener( view -> {
|
||||
// todo 测试动画
|
||||
if (!naviToggle) {
|
||||
View v = LayoutInflater.from(getContext()).inflate(R.layout.demo_top, null);
|
||||
ViewGroup.LayoutParams params =
|
||||
new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,
|
||||
(int) getResources().getDimension(R.dimen.dp_350));
|
||||
mApis.getTopViewManager().addTopView(v, params);
|
||||
}else{
|
||||
mApis.getTopViewManager().removeTopView();
|
||||
isClickShare = true;
|
||||
if ( mIMogoAuthorizeModuleManager.needAuthorize( AUTHORIZE_TYPE_LAUNCHER_SHARE ) ) {
|
||||
mIMogoAuthorizeModuleManager.invokeAuthorization( AUTHORIZE_TYPE_LAUNCHER_SHARE );
|
||||
} else {
|
||||
ShareControl.getInstance( getActivity() ).showDialog();
|
||||
traceData( "1" );
|
||||
}
|
||||
naviToggle = !naviToggle;
|
||||
// 原始逻辑
|
||||
// isClickShare = true;
|
||||
// if ( mIMogoAuthorizeModuleManager.needAuthorize( AUTHORIZE_TYPE_LAUNCHER_SHARE ) ) {
|
||||
// mIMogoAuthorizeModuleManager.invokeAuthorization( AUTHORIZE_TYPE_LAUNCHER_SHARE );
|
||||
// } else {
|
||||
// ShareControl.getInstance( getActivity() ).showDialog();
|
||||
// traceData( "1" );
|
||||
// }
|
||||
} );
|
||||
|
||||
mDisplayOverview = findViewById( R.id.module_ext_id_display_overview );
|
||||
@@ -234,24 +222,16 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
|
||||
|
||||
mMove2CurrentLocation = findViewById( R.id.module_entrance_id_move2_current_location );
|
||||
mMove2CurrentLocation.setOnClickListener( view -> {
|
||||
// todo 测试动画
|
||||
if (!toggle) {
|
||||
TopViewAnimHelper.getInstance().showNaviView();
|
||||
}else{
|
||||
TopViewAnimHelper.getInstance().hideNaviView();
|
||||
final MogoLocation location = mMogoLocationClient.getLastKnowLocation();
|
||||
if ( location != null ) {
|
||||
if ( !mMogoStatusManager.isV2XShow() ) {
|
||||
mMogoStatusManager.setUserInteractionStatus( TAG, true, false );
|
||||
mMApUIController.setLockZoom( 16 );
|
||||
mMApUIController.changeZoom( 16.0f );
|
||||
}
|
||||
mMogoStatusManager.setUserInteractionStatus( TAG, true, false );
|
||||
mMApUIController.recoverLockMode();
|
||||
}
|
||||
toggle = !toggle;
|
||||
// 原始逻辑
|
||||
// final MogoLocation location = mMogoLocationClient.getLastKnowLocation();
|
||||
// if ( location != null ) {
|
||||
// if ( !mMogoStatusManager.isV2XShow() ) {
|
||||
// mMogoStatusManager.setUserInteractionStatus( TAG, true, false );
|
||||
// mMApUIController.setLockZoom( 16 );
|
||||
// mMApUIController.changeZoom( 16.0f );
|
||||
// }
|
||||
// mMogoStatusManager.setUserInteractionStatus( TAG, true, false );
|
||||
// mMApUIController.recoverLockMode();
|
||||
// }
|
||||
} );
|
||||
|
||||
// mNaviInfo = findViewById( R.id.module_entrance_id_navi_info_panel );
|
||||
@@ -284,16 +264,13 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
|
||||
|
||||
mCameraMode = findViewById( R.id.module_ext_id_north );
|
||||
mCameraMode.setOnClickListener( view -> {
|
||||
// todo 测试动画
|
||||
TopViewAnimHelper.getInstance().debug();
|
||||
// 原始逻辑
|
||||
// if ( mCameraMode.isSelected() ) {
|
||||
// mMApUIController.changeMapMode( EnumMapUI.CarUp_2D );
|
||||
// } else {
|
||||
// mMApUIController.changeMapMode( EnumMapUI.NorthUP_2D );
|
||||
// }
|
||||
// mCameraMode.setSelected( !mCameraMode.isSelected() );
|
||||
// mCameraMode.setText( getString( mCameraMode.isSelected() ? R.string.mode_car_up : R.string.mode_north_up ) );
|
||||
if ( mCameraMode.isSelected() ) {
|
||||
mMApUIController.changeMapMode( EnumMapUI.CarUp_2D );
|
||||
} else {
|
||||
mMApUIController.changeMapMode( EnumMapUI.NorthUP_2D );
|
||||
}
|
||||
mCameraMode.setSelected( !mCameraMode.isSelected() );
|
||||
mCameraMode.setText( getString( mCameraMode.isSelected() ? R.string.mode_car_up : R.string.mode_north_up ) );
|
||||
} );
|
||||
|
||||
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
package com.mogo.module.extensions.utils;
|
||||
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.res.Resources;
|
||||
import android.transition.AutoTransition;
|
||||
import android.transition.Transition;
|
||||
import android.transition.TransitionManager;
|
||||
@@ -18,8 +16,6 @@ import androidx.constraintlayout.widget.Group;
|
||||
import com.mogo.module.extensions.R;
|
||||
import com.mogo.utils.logger.Logger;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
|
||||
/**
|
||||
* 顶部动画帮助类
|
||||
@@ -116,6 +112,12 @@ public class TopViewAnimHelper {
|
||||
|
||||
public void startTopInAnim(View view, ViewGroup.LayoutParams params) {
|
||||
Logger.d("TopViewAnimHelper", "startTopInAnim=====");
|
||||
if (view == null) {
|
||||
throw new IllegalArgumentException("method addTopView params view is null");
|
||||
}
|
||||
if (params == null) {
|
||||
throw new IllegalArgumentException("method addTopView params LayoutParams is null");
|
||||
}
|
||||
if (isTopViewOut) {
|
||||
isTopViewOut = false;
|
||||
|
||||
@@ -287,12 +289,4 @@ public class TopViewAnimHelper {
|
||||
|
||||
void onAnimEnd();
|
||||
}
|
||||
|
||||
private int[] iconRes = new int[]{R.drawable.ic_1, R.drawable.ic_2, R.drawable.ic_3};
|
||||
|
||||
public void debug() {
|
||||
Random random = new Random();
|
||||
int index = random.nextInt(3);
|
||||
ivTurnIcon.setImageResource(iconRes[index]);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,12 +18,6 @@ public class TopViewManager implements IMogoTopViewManager {
|
||||
|
||||
@Override
|
||||
public void addTopView(View view, ViewGroup.LayoutParams params) {
|
||||
if (view == null) {
|
||||
throw new IllegalArgumentException("method addTopView params view is null");
|
||||
}
|
||||
if (params == null) {
|
||||
throw new IllegalArgumentException("method addTopView params LayoutParams is null");
|
||||
}
|
||||
TopViewAnimHelper.getInstance().startTopInAnim(view, params);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user