修改导航指示view的ui问题
This commit is contained in:
@@ -209,29 +209,29 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
|
||||
mUploading = findViewById( R.id.module_entrance_id_uploading );
|
||||
mUploadRoadCondition.setOnClickListener( view -> {
|
||||
// // todo 测试动画
|
||||
// View v = LayoutInflater.from(getContext()).inflate(R.layout.demo_top, null);
|
||||
// TextView tv = v.findViewById(R.id.tvIndex);
|
||||
// tv.setText(demoCache.size() + ": " + v);
|
||||
// demoCache.add(v);
|
||||
// mApis.getTopViewManager().addView(v, new IMogoTopViewStatusListener() {
|
||||
// @Override
|
||||
// public void onViewAdded(View view) {
|
||||
// Logger.d(TAG, "onViewAdded: " + view);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void onViewRemoved(View view) {
|
||||
// Logger.d(TAG, "onViewRemoved: " + view);
|
||||
// }
|
||||
// });
|
||||
View v = LayoutInflater.from(getContext()).inflate(R.layout.demo_top, null);
|
||||
TextView tv = v.findViewById(R.id.tvIndex);
|
||||
tv.setText(demoCache.size() + ": " + v);
|
||||
demoCache.add(v);
|
||||
mApis.getTopViewManager().addView(v, new IMogoTopViewStatusListener() {
|
||||
@Override
|
||||
public void onViewAdded(View view) {
|
||||
Logger.d(TAG, "onViewAdded: " + view);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onViewRemoved(View view) {
|
||||
Logger.d(TAG, "onViewRemoved: " + view);
|
||||
}
|
||||
});
|
||||
// 原始逻辑
|
||||
isClickShare = true;
|
||||
if ( mIMogoAuthorizeModuleManager.needAuthorize( AUTHORIZE_TYPE_LAUNCHER_SHARE ) ) {
|
||||
mIMogoAuthorizeModuleManager.invokeAuthorization( AUTHORIZE_TYPE_LAUNCHER_SHARE );
|
||||
} else {
|
||||
ShareControl.getInstance( getActivity() ).showDialog();
|
||||
traceData( "1" );
|
||||
}
|
||||
// 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 );
|
||||
@@ -252,12 +252,12 @@ 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();
|
||||
// }
|
||||
// toggle = !toggle;
|
||||
if(!toggle) {
|
||||
TopViewAnimHelper.getInstance().showNaviView();
|
||||
}else{
|
||||
TopViewAnimHelper.getInstance().hideNaviView();
|
||||
}
|
||||
toggle = !toggle;
|
||||
// if(demoCache.size()>0) {
|
||||
// View v = demoCache.remove(demoCache.size() - 1);
|
||||
// boolean isViewAdded = mApis.getTopViewManager().isViewAdded(v);
|
||||
@@ -265,20 +265,20 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
|
||||
// mApis.getTopViewManager().removeView(v);
|
||||
// }
|
||||
// 原始逻辑
|
||||
final MogoLocation location = mMogoLocationClient.getLastKnowLocation();
|
||||
if ( location != null ) {
|
||||
if ( !mMogoStatusManager.isV2XShow() ) {
|
||||
mMogoStatusManager.setUserInteractionStatus( TAG, true, false );
|
||||
mMApUIController.setLockZoom( 16 );
|
||||
mMApUIController.changeZoom( 16.0f );
|
||||
}
|
||||
if ( mStatusManager.isDisplayOverview() ) {
|
||||
mMogoStatusManager.setDisplayOverview( TAG, false );
|
||||
UiThreadHandler.removeCallbacks( mLockCarRunnable );
|
||||
}
|
||||
mMogoStatusManager.setUserInteractionStatus( TAG, true, false );
|
||||
mMApUIController.recoverLockMode();
|
||||
}
|
||||
// final MogoLocation location = mMogoLocationClient.getLastKnowLocation();
|
||||
// if ( location != null ) {
|
||||
// if ( !mMogoStatusManager.isV2XShow() ) {
|
||||
// mMogoStatusManager.setUserInteractionStatus( TAG, true, false );
|
||||
// mMApUIController.setLockZoom( 16 );
|
||||
// mMApUIController.changeZoom( 16.0f );
|
||||
// }
|
||||
// if ( mStatusManager.isDisplayOverview() ) {
|
||||
// mMogoStatusManager.setDisplayOverview( TAG, false );
|
||||
// UiThreadHandler.removeCallbacks( mLockCarRunnable );
|
||||
// }
|
||||
// mMogoStatusManager.setUserInteractionStatus( TAG, true, false );
|
||||
// mMApUIController.recoverLockMode();
|
||||
// }
|
||||
} );
|
||||
|
||||
// mNaviInfo = findViewById( R.id.module_entrance_id_navi_info_panel );
|
||||
|
||||
@@ -208,6 +208,9 @@ public class TopViewAnimHelper {
|
||||
// 顶部view还没有内容,需要整体下移
|
||||
currentAnimatingView = view;
|
||||
viewCaches.add(view);
|
||||
// if (naviBg.getVisibility() == View.VISIBLE) {
|
||||
// tvNextRoad.setTextSize(getDimen(R.dimen.dp_34));
|
||||
// }
|
||||
topContainer.addView(view, params);
|
||||
|
||||
topContainer.setChildAddedListener(child -> {
|
||||
@@ -219,7 +222,8 @@ public class TopViewAnimHelper {
|
||||
|
||||
constraintSet.clone(topMotionLayout);
|
||||
|
||||
constraintSet.clear(R.id.module_entrance_id_top_container, ConstraintSet.BOTTOM);
|
||||
constraintSet.clear(R.id.module_entrance_id_top_container,
|
||||
ConstraintSet.BOTTOM);
|
||||
constraintSet.connect(R.id.module_entrance_id_top_container, ConstraintSet.TOP,
|
||||
R.id.module_entrance_id_top_motion_layout, ConstraintSet.TOP);
|
||||
// if (CarSeries.getSeries() == CarSeries.CAR_SERIES_F80X) {
|
||||
@@ -237,6 +241,10 @@ public class TopViewAnimHelper {
|
||||
constraintSet.connect(tvNextRoad.getId(), ConstraintSet.LEFT,
|
||||
R.id.module_map_id_navi_next_info_turn_info, ConstraintSet.RIGHT,
|
||||
(int) topMotionLayout.getContext().getResources().getDimension(R.dimen.dp_46));
|
||||
|
||||
constraintSet.connect(naviBg.getId(), ConstraintSet.TOP,
|
||||
R.id.module_entrance_id_top_motion_layout, ConstraintSet.TOP,
|
||||
(int) getDimen(R.dimen.dp_316));
|
||||
}
|
||||
constraintSet.applyTo(topMotionLayout);
|
||||
ivTurnIcon.getLayoutParams().height =
|
||||
@@ -312,6 +320,10 @@ public class TopViewAnimHelper {
|
||||
// 顶部view仅剩一个view,需要整体上移
|
||||
currentAnimatingView = view;
|
||||
isTopViewOut = true;
|
||||
// if (naviBg.getVisibility() == View.VISIBLE) {
|
||||
// tvNextRoad.setTextSize(getDimen(R.dimen
|
||||
// .module_ext_navi_info_panel_next_info_road_textSize));
|
||||
// }
|
||||
if (naviBg.getVisibility() == View.VISIBLE) {
|
||||
remainDistanceGroup.setVisibility(View.VISIBLE);
|
||||
remainTimeGroup.setVisibility(View.VISIBLE);
|
||||
@@ -336,6 +348,8 @@ public class TopViewAnimHelper {
|
||||
constraintSet.connect(tvNextRoad.getId(), ConstraintSet.LEFT,
|
||||
tvNextDistance.getId(), ConstraintSet.LEFT,
|
||||
0);
|
||||
constraintSet.connect(naviBg.getId(), ConstraintSet.TOP,
|
||||
R.id.module_entrance_id_top_motion_layout, ConstraintSet.TOP, 0);
|
||||
}
|
||||
constraintSet.applyTo(topMotionLayout);
|
||||
|
||||
@@ -381,6 +395,9 @@ public class TopViewAnimHelper {
|
||||
// naviBg.getLayoutParams().height =
|
||||
// (int) topMotionLayout.getContext().getResources().getDimension(R.dimen
|
||||
// .module_ext_navi_info_panel_height);
|
||||
constraintSet.connect(naviBg.getId(), ConstraintSet.TOP,
|
||||
R.id.module_entrance_id_top_motion_layout, ConstraintSet.TOP,
|
||||
0);
|
||||
constraintSet.applyTo(topMotionLayout);
|
||||
scene = Scene.NAVI_WITH_ROAD_EVENT;
|
||||
} else {
|
||||
@@ -397,6 +414,9 @@ public class TopViewAnimHelper {
|
||||
constraintSet.connect(tvNextRoad.getId(), ConstraintSet.LEFT,
|
||||
R.id.module_map_id_navi_next_info_turn_info, ConstraintSet.RIGHT,
|
||||
(int) topMotionLayout.getContext().getResources().getDimension(R.dimen.dp_46));
|
||||
constraintSet.connect(naviBg.getId(), ConstraintSet.TOP,
|
||||
R.id.module_entrance_id_top_motion_layout, ConstraintSet.TOP,
|
||||
(int) getDimen(R.dimen.dp_316));
|
||||
// ivTurnIcon.getLayoutParams().height =
|
||||
// (int) getDimen(R.dimen.module_ext_navi_info_panel_turn_icon_small_height);
|
||||
// ivTurnIcon.getLayoutParams().width =
|
||||
|
||||
Reference in New Issue
Block a user