定位按钮实现调整车头方向功能
This commit is contained in:
@@ -11,6 +11,7 @@ import android.view.LayoutInflater;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.ImageView;
|
||||
import android.widget.TextView;
|
||||
|
||||
@@ -112,7 +113,7 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
private TextView mUpload;
|
||||
private ImageView mUploading;
|
||||
|
||||
private View mMove2CurrentLocation;
|
||||
private ImageButton mMove2CurrentLocation;
|
||||
|
||||
private NaviInfoView mNaviInfo;
|
||||
private TextView mExitNavi;
|
||||
@@ -247,9 +248,17 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
mStatusManager.setDisplayOverview(TAG, false);
|
||||
UiThreadHandler.removeCallbacks(mLockCarRunnable);
|
||||
}
|
||||
if ( !mApis.getRefreshStrategyControllerApi().restartAutoRefreshAtTime( 0 ) ) {
|
||||
mStatusManager.setUserInteractionStatus(TAG, true, false);
|
||||
mMApUIController.recoverLockMode();
|
||||
if ( mIsLock ) {
|
||||
if ( mMApUIController.getCurrentUiMode() == EnumMapUI.CarUp_2D ) {
|
||||
mMApUIController.changeMapMode( EnumMapUI.NorthUP_2D );
|
||||
} else if( mMApUIController.getCurrentUiMode() == EnumMapUI.NorthUP_2D ){
|
||||
mMApUIController.changeMapMode( EnumMapUI.CarUp_2D );
|
||||
}
|
||||
} else {
|
||||
if ( !mApis.getRefreshStrategyControllerApi().restartAutoRefreshAtTime( 0 ) ) {
|
||||
mStatusManager.setUserInteractionStatus(TAG, true, false);
|
||||
mMApUIController.recoverLockMode();
|
||||
}
|
||||
}
|
||||
}
|
||||
} );
|
||||
@@ -734,6 +743,16 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
} else {
|
||||
mExitNavi.setText(R.string.module_ext_str_continue_navi);
|
||||
}
|
||||
|
||||
if ( isLock ) {
|
||||
if ( mMApUIController.getCurrentUiMode() == EnumMapUI.CarUp_2D ) {
|
||||
mMove2CurrentLocation.setImageResource( R.drawable.icon_north_up );
|
||||
} else {
|
||||
mMove2CurrentLocation.setImageResource( R.drawable.icon_car_up );
|
||||
}
|
||||
} else {
|
||||
mMove2CurrentLocation.setImageResource( R.drawable.module_map_ic_move2_current_location );
|
||||
}
|
||||
}
|
||||
|
||||
private void traceData(String from) {
|
||||
@@ -784,7 +803,6 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void renderWeatherInfo(String temp, String desc, int iconId) {
|
||||
if (!DebugConfig.isMapBased()) {
|
||||
@@ -929,6 +947,12 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
|
||||
}
|
||||
mCameraMode.setSelected(ui == EnumMapUI.NorthUP_2D);
|
||||
mCameraMode.setText(getString(ui == EnumMapUI.NorthUP_2D ? R.string.mode_car_up : R.string.mode_north_up));
|
||||
|
||||
if ( ui == EnumMapUI.CarUp_2D ) {
|
||||
mMove2CurrentLocation.setImageResource( R.drawable.icon_north_up );
|
||||
} else if( ui == EnumMapUI.NorthUP_2D ){
|
||||
mMove2CurrentLocation.setImageResource( R.drawable.icon_car_up );
|
||||
}
|
||||
}
|
||||
|
||||
private static int SEEK_HELP_NOTICE_NUM_MSG_TYPE = 401015;
|
||||
|
||||
Reference in New Issue
Block a user