opt
This commit is contained in:
@@ -423,7 +423,13 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
|
||||
if ( naviinfo == null ) {
|
||||
return;
|
||||
}
|
||||
mNaviInfo.notifyChanged( naviinfo );
|
||||
if ( mNaviInfo != null ) {
|
||||
if ( !mNaviInfo.isVisible() ) {
|
||||
// 避免导航先开启,再开启app的情况
|
||||
onStartNavi();
|
||||
}
|
||||
mNaviInfo.notifyChanged( naviinfo );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -26,7 +26,7 @@ public class NaviInfoView extends BaseNaviInfoView {
|
||||
private TextView remainingTimeUnit;
|
||||
private TextView arriveTime;
|
||||
|
||||
public void inflate(View view){
|
||||
public void inflate( View view ) {
|
||||
turnIcon = view.findViewById( R.id.module_map_id_navi_next_info_road_turn_icon );
|
||||
distance = view.findViewById( R.id.module_map_id_navi_next_info_distance );
|
||||
distanceUnit = view.findViewById( R.id.module_map_id_navi_next_info_distance_unit );
|
||||
@@ -39,6 +39,11 @@ public class NaviInfoView extends BaseNaviInfoView {
|
||||
arriveTime = view.findViewById( R.id.module_map_id_arrive_time );
|
||||
}
|
||||
|
||||
public boolean isVisible() {
|
||||
return turnIcon != null && turnIcon.getVisibility() == View.VISIBLE;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void notifyChanged( MogoNaviInfo naviInfo ) {
|
||||
super.notifyChanged( naviInfo );
|
||||
|
||||
Reference in New Issue
Block a user