This commit is contained in:
wangcongtao
2020-09-22 20:22:48 +08:00
parent a186f46b6c
commit eb511fa3c1
107 changed files with 1850 additions and 183 deletions

View File

@@ -8,6 +8,7 @@ import androidx.lifecycle.LifecycleOwner;
import com.alibaba.android.arouter.launcher.ARouter;
import com.mogo.commons.mvp.Presenter;
import com.mogo.commons.network.Utils;
import com.mogo.module.common.MogoApisHandler;
import com.mogo.module.extensions.net.UserInfoNetApiServices;
import com.mogo.module.extensions.userinfo.UserInfo;
import com.mogo.module.extensions.userinfo.UserInfoConstant;
@@ -53,8 +54,7 @@ public class ExtensionsPresenter extends Presenter< ExtensionsView > implements
public ExtensionsPresenter( ExtensionsView view ) {
super( view );
mWeatherModel = new WeatherModel( getContext() );
mNetWork =
((IMogoServiceApis) ARouter.getInstance().build(MogoServicePaths.PATH_SERVICE_APIS).navigation(view.getContext())).getNetworkApi();
mNetWork = MogoApisHandler.getInstance().getApis().getNetworkApi();
}
@Override

View File

@@ -32,6 +32,7 @@ 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.MogoApisHandler;
import com.mogo.module.common.dialog.WMDialog;
import com.mogo.module.common.glide.SkinAbleBitmapTarget;
import com.mogo.module.common.map.CustomNaviInterrupter;
@@ -45,7 +46,6 @@ import com.mogo.module.extensions.utils.EntranceViewHolder;
import com.mogo.module.extensions.utils.TopViewAnimHelper;
import com.mogo.module.share.manager.ServiceApisManager;
import com.mogo.service.IMogoServiceApis;
import com.mogo.service.MogoServicePaths;
import com.mogo.service.analytics.IMogoAnalytics;
import com.mogo.service.entrance.ButtonIndex;
import com.mogo.service.fragmentmanager.IFragmentProvider;
@@ -135,6 +135,8 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
private boolean toggle = false;
private View mOnlineCarEntrance;
private Runnable mLockCarRunnable = new Runnable() {
@Override
public void run() {
@@ -155,7 +157,7 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
@Override
protected void initViews() {
mApis = (IMogoServiceApis) ARouter.getInstance().build(MogoServicePaths.PATH_SERVICE_APIS).navigation(getContext());
mApis = MogoApisHandler.getInstance().getApis();
mEntrancePresenter = new EntrancePresenter(getContext(), this);
mMogoFragmentManager = mApis.getFragmentManagerApi();
@@ -317,6 +319,14 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
mUploadButtonAnimatorController = new UploadButtonAnimatorController(mUploading, mUpload,
mStatusManager);
mOnlineCarEntrance = findViewById( R.id.module_ext_id_destination_online_car );
mOnlineCarEntrance.setOnClickListener( view -> {
MogoApisHandler.getInstance().getApis().getOnlineCarPanelApi().showPanel();
Map<String, Object> properties = new HashMap<>();
properties.put( "type", 1 );
MogoApisHandler.getInstance().getApis().getAnalyticsApi().track( "APP_Find_Mogoer", properties );
} );
dealWeatherContainer();
debugTopView();
@@ -429,6 +439,11 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
mCameraMode.setVisibility(View.VISIBLE);
}
mApis.getAnalyticsApi().track("Navigation_begin", new HashMap<>());
if ( DebugConfig.isSupportedSearchDestinationOnlineCarList() ) {
mOnlineCarEntrance.setVisibility( View.VISIBLE );
} else {
mOnlineCarEntrance.setVisibility( View.GONE );
}
}
@Override
@@ -438,6 +453,7 @@ public class EntranceFragment extends MvpFragment<EntranceView, EntrancePresente
mMApUIController.changeMapMode(EnumMapUI.NorthUP_2D);
mDisplayOverview.setVisibility(View.GONE);
mCameraMode.setVisibility(View.GONE);
mOnlineCarEntrance.setVisibility( View.GONE );
MapCenterPointStrategy.setMapCenterPointByScene(mMApUIController, Scene.AIMLESS);
}

View File

@@ -9,6 +9,7 @@ import androidx.lifecycle.LifecycleOwner;
import com.alibaba.android.arouter.launcher.ARouter;
import com.mogo.commons.mvp.Presenter;
import com.mogo.commons.network.Utils;
import com.mogo.module.common.MogoApisHandler;
import com.mogo.module.extensions.R;
import com.mogo.module.extensions.net.UserInfoNetApiServices;
import com.mogo.module.extensions.userinfo.UserInfo;
@@ -55,8 +56,7 @@ public class EntrancePresenter extends Presenter<EntranceView> implements Weathe
public EntrancePresenter(Context context, EntranceView view) {
super(view);
mWeatherModel = new WeatherModel( getContext() );
mNetWork =
((IMogoServiceApis) ARouter.getInstance().build(MogoServicePaths.PATH_SERVICE_APIS).navigation(view.getContext())).getNetworkApi();
mNetWork = MogoApisHandler.getInstance().getApis().getNetworkApi();
}
@Override

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

View File

@@ -36,6 +36,30 @@
app:layout_goneMarginTop="@dimen/module_ext_north_goneMarginTop"
tools:visibility="visible" />
<TextView
android:id="@+id/module_ext_id_destination_online_car"
android:layout_width="wrap_content"
android:layout_height="@dimen/module_ext_button_height"
android:layout_marginTop="@dimen/module_ext_camera_button_marginTop"
android:background="@drawable/module_ext_dw_navi_info_panel_bkg"
android:drawableLeft="@drawable/module_ext_destination_online_car_dw"
android:gravity="center"
android:drawablePadding="@dimen/module_ext_destination_online_car_drawablePadding"
android:paddingTop="@dimen/dp_14"
android:text="@string/module_ext_destination_online_car_text"
android:visibility="gone"
android:layout_marginLeft="@dimen/module_common_shadow_width_pos"
android:textColor="@color/module_ext_color_voice_text"
android:textSize="@dimen/module_ext_north_textSize"
android:textStyle="bold"
android:paddingRight="@dimen/module_ext_destination_online_car_paddingRight"
android:paddingLeft="@dimen/module_ext_destination_online_car_paddingLeft"
app:layout_constraintLeft_toLeftOf="@+id/module_map_id_navi_bg"
app:layout_constraintTop_toBottomOf="@+id/module_map_id_navi_bg"
app:layout_goneMarginTop="@dimen/module_ext_north_goneMarginTop"
tools:visibility="visible" />
<com.mogo.module.extensions.navi.TopView
android:id="@+id/module_entrance_id_top_container"
android:layout_width="match_parent"
@@ -58,7 +82,7 @@
android:layout_marginLeft="@dimen/module_common_shadow_width_pos"
app:layout_constraintLeft_toLeftOf="@+id/module_map_id_navi_bg"
app:layout_constraintTop_toBottomOf="@+id/module_map_id_navi_bg"
tools:visibility="visible">
tools:visibility="gone">
<ImageView
android:id="@+id/module_ext_id_display_overview_icon"

View File

@@ -5,4 +5,7 @@
<dimen name="module_ext_layout_padding">10px</dimen>
<dimen name="module_ext_layout_paddingRight">2px</dimen>
<dimen name="module_ext_layout_paddingBottom">2px</dimen>
<dimen name="module_ext_destination_online_car_drawablePadding">4px</dimen>
<dimen name="module_ext_destination_online_car_paddingLeft">14px</dimen>
<dimen name="module_ext_destination_online_car_paddingRight">14px</dimen>
</resources>

View File

@@ -150,4 +150,7 @@
<dimen name="module_ext_layout_padding">30px</dimen>
<dimen name="module_ext_layout_paddingRight">20px</dimen>
<dimen name="module_ext_layout_paddingBottom">20px</dimen>
<dimen name="module_ext_destination_online_car_drawablePadding">8px</dimen>
<dimen name="module_ext_destination_online_car_paddingLeft">21px</dimen>
<dimen name="module_ext_destination_online_car_paddingRight">31px</dimen>
</resources>

View File

@@ -152,4 +152,7 @@
<dimen name="module_ext_layout_padding">30px</dimen>
<dimen name="module_ext_layout_paddingRight">20px</dimen>
<dimen name="module_ext_layout_paddingBottom">20px</dimen>
<dimen name="module_ext_destination_online_car_drawablePadding">8px</dimen>
<dimen name="module_ext_destination_online_car_paddingLeft">21px</dimen>
<dimen name="module_ext_destination_online_car_paddingRight">31px</dimen>
</resources>

View File

@@ -157,4 +157,7 @@
<dimen name="module_ext_layout_padding">10px</dimen>
<dimen name="module_ext_layout_paddingRight">2px</dimen>
<dimen name="module_ext_layout_paddingBottom">2px</dimen>
<dimen name="module_ext_destination_online_car_drawablePadding">4px</dimen>
<dimen name="module_ext_destination_online_car_paddingLeft">14px</dimen>
<dimen name="module_ext_destination_online_car_paddingRight">14px</dimen>
</resources>

View File

@@ -22,6 +22,7 @@
<string name="module_ext_str_exit_path">退出全览</string>
<string name="mode_car_up">车头</string>
<string name="mode_north_up">正北</string>
<string name="module_ext_destination_online_car_text">目的地车友</string>
<string-array name="module_ext_str_arr_ai_tips">
<item>你好小智,播放音乐</item>