opt
This commit is contained in:
@@ -23,6 +23,7 @@ import com.mogo.map.model.MogoPoi;
|
||||
import com.mogo.map.navi.IMogoNavi;
|
||||
import com.mogo.map.navi.IMogoNaviListener;
|
||||
import com.mogo.map.navi.MogoNaviInfo;
|
||||
import com.mogo.map.navi.MogoTraffic;
|
||||
import com.mogo.map.uicontroller.EnumMapUI;
|
||||
import com.mogo.map.uicontroller.IMogoMapUIController;
|
||||
import com.mogo.module.common.MogoModulePaths;
|
||||
@@ -41,6 +42,7 @@ import com.mogo.service.module.IMogoModuleProvider;
|
||||
import com.mogo.service.module.IMogoRegisterCenter;
|
||||
import com.mogo.service.windowview.IMogoWindowManager;
|
||||
import com.mogo.utils.TipToast;
|
||||
|
||||
import java.util.HashMap;
|
||||
|
||||
/**
|
||||
@@ -67,6 +69,10 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
|
||||
private NaviInfoView mNaviInfo;
|
||||
private TextView mExitNavi;
|
||||
|
||||
private View mSpeedLimit;
|
||||
private TextView mSpeedLimitValue;
|
||||
private View mSpeedLimitUnit;
|
||||
|
||||
private IMogoMapService mService;
|
||||
private IMogoMapUIController mMApUIController;
|
||||
private IMogoLocationClient mMogoLocationClient;
|
||||
@@ -91,7 +97,7 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
|
||||
@Override
|
||||
protected void initViews() {
|
||||
mMogoFragmentManager = ( IMogoFragmentManager ) ARouter.getInstance().build( MogoServicePaths.PATH_FRAGMENT_MANAGER ).navigation();
|
||||
mMogoAddressManager = (IMogoAddressManager) ARouter.getInstance().build( MogoServicePaths.PATH_ADDRESS_MANAGER ).navigation();
|
||||
mMogoAddressManager = ( IMogoAddressManager ) ARouter.getInstance().build( MogoServicePaths.PATH_ADDRESS_MANAGER ).navigation();
|
||||
mCommonAddress = findViewById( R.id.module_entrance_id_common_address );
|
||||
|
||||
mSearch = findViewById( R.id.module_entrance_id_search );
|
||||
@@ -135,7 +141,7 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
|
||||
mExitNavi.setOnClickListener( view -> {
|
||||
if ( mMogoNavi != null ) {
|
||||
if ( mIsLock ) {
|
||||
NaviNoticeDialog naviNoticeDialog = new NaviNoticeDialog(getContext());
|
||||
NaviNoticeDialog naviNoticeDialog = new NaviNoticeDialog( getContext() );
|
||||
naviNoticeDialog.show();
|
||||
} else {
|
||||
mMApUIController.recoverLockMode();
|
||||
@@ -143,6 +149,10 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
|
||||
}
|
||||
} );
|
||||
|
||||
mSpeedLimit = findViewById( R.id.module_entrance_id_speed_limit_container );
|
||||
mSpeedLimitValue = findViewById( R.id.module_entrance_id_speed_limit_value );
|
||||
mSpeedLimitUnit = findViewById( R.id.module_entrance_id_speed_limit_unit );
|
||||
|
||||
}
|
||||
|
||||
@NonNull
|
||||
@@ -188,9 +198,9 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
|
||||
mCommonAddress.setVisibility( View.GONE );
|
||||
mNaviInfo.setVisibility( View.VISIBLE );
|
||||
mExitNavi.setVisibility( View.VISIBLE );
|
||||
AnalyticsUtils.track("Navigation_guide_type", new HashMap<>());
|
||||
AnalyticsUtils.track( "Navigation_guide_type", new HashMap<>() );
|
||||
|
||||
mMApUIController.setPointToCenter(0.675926, 0.77552);
|
||||
mMApUIController.setPointToCenter( 0.675926, 0.77552 );
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -198,9 +208,10 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
|
||||
mCommonAddress.setVisibility( View.VISIBLE );
|
||||
mNaviInfo.setVisibility( View.GONE );
|
||||
mExitNavi.setVisibility( View.GONE );
|
||||
AnalyticsUtils.track("Navigation_guide_type", new HashMap<>());
|
||||
mSpeedLimit.setVisibility( View.GONE );
|
||||
AnalyticsUtils.track( "Navigation_guide_type", new HashMap<>() );
|
||||
|
||||
mMApUIController.setPointToCenter(0.66145, 0.590688);
|
||||
mMApUIController.setPointToCenter( 0.66145, 0.590688 );
|
||||
|
||||
}
|
||||
|
||||
@@ -212,6 +223,20 @@ public class EntranceFragment extends MvpFragment< EntranceView, EntrancePresent
|
||||
public void onoCalculateFailed() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUpdateTraffic( MogoTraffic traffic ) {
|
||||
if ( traffic == null ) {
|
||||
return;
|
||||
}
|
||||
if ( traffic.getSpeedLimit() <= 0 ) {
|
||||
mSpeedLimit.setVisibility( View.INVISIBLE );
|
||||
mSpeedLimitValue.setText( "--" );
|
||||
} else {
|
||||
mSpeedLimit.setVisibility( View.VISIBLE );
|
||||
mSpeedLimitValue.setText( String.valueOf( traffic.getSpeedLimit() ) );
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMapLoaded() {
|
||||
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item>
|
||||
<shape>
|
||||
<corners android:radius="90dp" />
|
||||
<stroke android:width="@dimen/dp_6" android:color="#B92F49" />/>
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
||||
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
@@ -71,6 +72,36 @@
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/module_entrance_id_speed_limit_container"
|
||||
android:layout_width="@dimen/dp_180"
|
||||
android:layout_height="@dimen/dp_180"
|
||||
android:layout_marginTop="@dimen/dp_2"
|
||||
android:layout_marginRight="@dimen/dp_60"
|
||||
android:background="@drawable/module_ext_dw_speed_limit_bkg"
|
||||
android:gravity="center"
|
||||
android:visibility="invisible"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_entrance_id_speed_limit_value"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="#FFFFFF"
|
||||
android:textSize="@dimen/dp_60"
|
||||
tools:text="100" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/module_entrance_id_speed_limit_unit"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="km/h"
|
||||
android:textColor="#CCFFFFFF"
|
||||
android:textSize="@dimen/dp_28" />
|
||||
</LinearLayout>
|
||||
|
||||
<com.mogo.module.extensions.navi.NaviInfoView
|
||||
android:id="@+id/module_entrance_id_navi_info_panel"
|
||||
android:layout_width="wrap_content"
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
android:layout_height="@dimen/dp_120"
|
||||
android:background="@drawable/module_ext_dw_shadow_frame_bkg"
|
||||
android:orientation="vertical"
|
||||
android:paddingLeft="@dimen/dp_70"
|
||||
android:paddingRight="@dimen/dp_70">
|
||||
android:paddingLeft="@dimen/dp_60"
|
||||
android:paddingRight="@dimen/dp_60">
|
||||
|
||||
<com.mogo.module.extensions.anim.JSurfaceView
|
||||
android:id="@+id/module_ext_id_voice"
|
||||
|
||||
Reference in New Issue
Block a user