Merge branch 'feature/v1.0.0' of gitlab.zhidaoauto.com:ecos/yycp-service/Launcher into feature/v1.0.0
This commit is contained in:
14
.idea/misc.xml
generated
14
.idea/misc.xml
generated
@@ -1,14 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="CMakeSettings">
|
||||
<configurations>
|
||||
<configuration PROFILE_NAME="Debug" CONFIG_NAME="Debug" />
|
||||
</configurations>
|
||||
</component>
|
||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="JDK" project-jdk-type="JavaSDK">
|
||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
<option name="id" value="Android" />
|
||||
</component>
|
||||
</project>
|
||||
@@ -3,9 +3,11 @@ package com.mogo.commons.mvp;
|
||||
import android.content.Context;
|
||||
import android.os.Bundle;
|
||||
|
||||
import android.view.MotionEvent;
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.Nullable;
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
import com.mogo.utils.SoftKeyBoardJobber;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
@@ -53,6 +55,22 @@ public abstract class MvpActivity< V extends IView, P extends Presenter< V > >
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean dispatchTouchEvent( MotionEvent ev ) {
|
||||
if ( ev.getAction() == MotionEvent.ACTION_DOWN && enableDispatchTouchEventToDismissSoftKeyBoard() ) {
|
||||
SoftKeyBoardJobber.hideIfNecessary( this, ev );
|
||||
return super.dispatchTouchEvent( ev );
|
||||
}
|
||||
// 必不可少,否则所有的组件都不会有TouchEvent了
|
||||
if ( getWindow().superDispatchTouchEvent( ev ) ) {
|
||||
return true;
|
||||
}
|
||||
return onTouchEvent( ev );
|
||||
}
|
||||
protected boolean enableDispatchTouchEventToDismissSoftKeyBoard() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDestroy() {
|
||||
super.onDestroy();
|
||||
|
||||
@@ -184,6 +184,10 @@ public class NaviClient implements IMogoNavi {
|
||||
return mMogoNaviConfig;
|
||||
}
|
||||
|
||||
@Override public boolean setBroadcastMode(int mode) {
|
||||
return mAMapNavi.setBroadcastMode(mode);
|
||||
}
|
||||
|
||||
// -- end
|
||||
|
||||
private boolean checkAMapNavi() {
|
||||
|
||||
@@ -1,2 +1,4 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.mogo.map.api" />
|
||||
package="com.mogo.map.api" >
|
||||
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
|
||||
</manifest>
|
||||
|
||||
@@ -104,7 +104,17 @@ public interface IMogoNavi {
|
||||
*/
|
||||
void setCalculatePathDisplayBounds( Rect bounds );
|
||||
|
||||
|
||||
/**
|
||||
* 导航配置
|
||||
* @return
|
||||
*/
|
||||
MogoNaviConfig getNaviConfig();
|
||||
|
||||
/**
|
||||
* 设置播报模式
|
||||
* @param mode
|
||||
* @return
|
||||
*/
|
||||
boolean setBroadcastMode(int mode);
|
||||
|
||||
}
|
||||
|
||||
@@ -142,4 +142,11 @@ public class MogoNavi implements IMogoNavi {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override public boolean setBroadcastMode(int mode) {
|
||||
if (mDelegate != null) {
|
||||
return mDelegate.setBroadcastMode(mode);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.mogo.map.constants;
|
||||
|
||||
/**
|
||||
* @author zyz
|
||||
* 2020-01-14.
|
||||
*/
|
||||
public class BroadcastMode {
|
||||
public static final int CONCISE = 1;
|
||||
public static final int DETAIL = 2;
|
||||
}
|
||||
@@ -8,8 +8,8 @@ import java.io.Serializable;
|
||||
public class MarkerShareMusic implements Serializable {
|
||||
|
||||
private String bookInfo;
|
||||
private Double id;
|
||||
private Double likeNumber;
|
||||
private int id;
|
||||
private int likeNumber;
|
||||
private MarkerLocation location;
|
||||
private String mediaId;
|
||||
private String mediaImg;
|
||||
@@ -17,7 +17,7 @@ public class MarkerShareMusic implements Serializable {
|
||||
private String mediaSinger;
|
||||
private String mediaUrl;
|
||||
private String shareContentText;
|
||||
private Double shareType;
|
||||
private int shareType;
|
||||
private String type;
|
||||
private MarkerUserInfo userInfo;
|
||||
|
||||
@@ -29,19 +29,19 @@ public class MarkerShareMusic implements Serializable {
|
||||
this.bookInfo = bookInfo;
|
||||
}
|
||||
|
||||
public Double getId() {
|
||||
public int getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Double id) {
|
||||
public void setId(int id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Double getLikeNumber() {
|
||||
public int getLikeNumber() {
|
||||
return likeNumber;
|
||||
}
|
||||
|
||||
public void setLikeNumber(Double likeNumber) {
|
||||
public void setLikeNumber(int likeNumber) {
|
||||
this.likeNumber = likeNumber;
|
||||
}
|
||||
|
||||
@@ -93,11 +93,11 @@ public class MarkerShareMusic implements Serializable {
|
||||
this.shareContentText = shareContentText;
|
||||
}
|
||||
|
||||
public Double getShareType() {
|
||||
public int getShareType() {
|
||||
return shareType;
|
||||
}
|
||||
|
||||
public void setShareType(Double shareType) {
|
||||
public void setShareType(int shareType) {
|
||||
this.shareType = shareType;
|
||||
}
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ public class MarkerShowEntity {
|
||||
|
||||
// false - 没选中,true - 选中
|
||||
private boolean isChecked;
|
||||
// icon 地址,例如:头像,唱片图片,探路缩略
|
||||
// icon 地址,例如:头像,唱片图片,探路缩略,可能为空展示默认图
|
||||
private String iconUrl;
|
||||
// 要展示的文本
|
||||
private String textContent;
|
||||
@@ -77,12 +77,17 @@ public class MarkerShowEntity {
|
||||
if (this == o) return true;
|
||||
if (o == null || getClass() != o.getClass()) return false;
|
||||
MarkerShowEntity that = (MarkerShowEntity) o;
|
||||
return bindObj.equals(that.bindObj);
|
||||
return isChecked == that.isChecked &&
|
||||
Objects.equals(iconUrl, that.iconUrl) &&
|
||||
Objects.equals(textContent, that.textContent) &&
|
||||
Objects.equals(markerType, that.markerType) &&
|
||||
Objects.equals(bindObj, that.bindObj) &&
|
||||
Objects.equals(markerLocation, that.markerLocation);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return Objects.hash(bindObj);
|
||||
return Objects.hash(isChecked, iconUrl, textContent, markerType, bindObj, markerLocation);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -11,6 +11,7 @@ import androidx.annotation.Nullable;
|
||||
import androidx.fragment.app.Fragment;
|
||||
|
||||
import com.alibaba.android.arouter.launcher.ARouter;
|
||||
import com.mogo.commons.analytics.AnalyticsUtils;
|
||||
import com.mogo.commons.mvp.MvpFragment;
|
||||
import com.mogo.map.MogoLatLng;
|
||||
import com.mogo.map.listener.IMogoMapListener;
|
||||
@@ -40,6 +41,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;
|
||||
|
||||
/**
|
||||
* @author congtaowang
|
||||
@@ -186,6 +188,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<>());
|
||||
|
||||
mMApUIController.setPointToCenter(0.675926, 0.77552);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -193,6 +198,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<>());
|
||||
|
||||
mMApUIController.setPointToCenter(0.66145, 0.590688);
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -45,7 +45,7 @@ public abstract class BaseSearchFragment extends BaseFragment implements SearchV
|
||||
protected SearchPresenter mSearchPresenter;
|
||||
|
||||
private View mClose;
|
||||
private EditText mSearchBox;
|
||||
protected EditText mSearchBox;
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -62,7 +62,9 @@ public class CategoryPresenter extends Presenter<CategoryView> {
|
||||
}
|
||||
|
||||
public void startSearchLocalPoiByInput(String keyword) {
|
||||
MogoPoiSearchQuery mogoInputtipsQuery = new MogoPoiSearchQuery("", keyword);
|
||||
MogoPoiSearchQuery mogoInputtipsQuery = new MogoPoiSearchQuery(keyword, keyword);
|
||||
mogoInputtipsQuery.setPageSize(10);
|
||||
mogoInputtipsQuery.getCity();
|
||||
mogoInputtipsQuery.setLocation(
|
||||
SearchServiceHolder.INSTANCE.getMapUIController().getWindowCenterLocation());
|
||||
IMogoPoiSearch inputtipsSearch =
|
||||
|
||||
@@ -57,9 +57,11 @@ class CategorySearchFragment : BaseFragment(), CategoryView {
|
||||
}
|
||||
addMarkers = SearchServiceHolder.getMarkerManger()
|
||||
.addMarkers(TAG, arrayList, true)
|
||||
|
||||
moveMapToRight()
|
||||
}
|
||||
|
||||
|
||||
|
||||
private lateinit var mAdapter: SearchCategoryAdapter
|
||||
|
||||
private lateinit var mSearchPresenter: CategoryPresenter
|
||||
@@ -73,6 +75,7 @@ class CategorySearchFragment : BaseFragment(), CategoryView {
|
||||
mSearchPresenter = CategoryPresenter(this)
|
||||
lifecycle.addObserver(mSearchPresenter)
|
||||
|
||||
|
||||
}
|
||||
|
||||
override fun getLayoutId(): Int {
|
||||
@@ -137,7 +140,6 @@ class CategorySearchFragment : BaseFragment(), CategoryView {
|
||||
override fun onActivityCreated(savedInstanceState: Bundle?) {
|
||||
super.onActivityCreated(savedInstanceState)
|
||||
mSearchPresenter.startSearchLocalPoiByInput(category)
|
||||
|
||||
}
|
||||
|
||||
override fun onDestroyView() {
|
||||
@@ -146,6 +148,7 @@ class CategorySearchFragment : BaseFragment(), CategoryView {
|
||||
lifecycle.removeObserver(mSearchPresenter)
|
||||
SearchServiceHolder.getMarkerManger()
|
||||
.removeMarkers(TAG)
|
||||
moveMapToCenter()
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
|
||||
@@ -10,6 +10,7 @@ import androidx.fragment.app.Fragment;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
import com.alibaba.android.arouter.facade.annotation.Route;
|
||||
import com.mogo.commons.analytics.AnalyticsUtils;
|
||||
import com.mogo.map.search.inputtips.MogoTip;
|
||||
import com.mogo.module.common.MogoModulePaths;
|
||||
import com.mogo.module.navi.R;
|
||||
@@ -23,6 +24,7 @@ import com.mogo.module.navi.ui.base.UiController;
|
||||
import com.mogo.module.navi.ui.setting.NaviSettingFragment;
|
||||
import com.mogo.service.fragmentmanager.FragmentDescriptor;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -114,6 +116,7 @@ public class SearchFragment extends BaseSearchFragment implements SearchView, Vi
|
||||
|
||||
mHistoryAdapter.setOnClickListener(new View.OnClickListener() {
|
||||
@Override public void onClick(View v) {
|
||||
AnalyticsUtils.track("Navigation_History_destination", new HashMap<String,Object>());
|
||||
SearchPoi item = (SearchPoi) v.getTag(R.id.tag_item);
|
||||
MogoTip mogoTip = EntityConvertUtils.poi2MogoTip(item);
|
||||
SearchServiceHolder.INSTANCE.push(ChoosePathFragment.Companion.newInstance(mogoTip.getPoint()),
|
||||
@@ -139,6 +142,8 @@ public class SearchFragment extends BaseSearchFragment implements SearchView, Vi
|
||||
|
||||
findViewById(R.id.tv_navi_setting).setOnClickListener(new View.OnClickListener() {
|
||||
@Override public void onClick(View v) {
|
||||
AnalyticsUtils.track("Navigation_button_setting", new HashMap<String,Object>());
|
||||
|
||||
push(new NaviSettingFragment(), MogoModulePaths.PATH_FRAGMENT_SETTING);
|
||||
}
|
||||
});
|
||||
@@ -160,6 +165,14 @@ public class SearchFragment extends BaseSearchFragment implements SearchView, Vi
|
||||
findViewById(R.id.tv_navi_gas).setOnClickListener(this);
|
||||
findViewById(R.id.tv_navi_restaurant).setOnClickListener(this);
|
||||
findViewById(R.id.tv_navi_park).setOnClickListener(this);
|
||||
|
||||
findViewById(R.id.tv_navi_search).setOnClickListener(new View.OnClickListener() {
|
||||
@Override public void onClick(View v) {
|
||||
AnalyticsUtils.track("Navigation_button_search", new HashMap<String,Object>());
|
||||
|
||||
mSearchPresenter.startSearchPoiByInput(mSearchBox.getText().toString());
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void push(Fragment fragment, String tag) {
|
||||
@@ -170,8 +183,6 @@ public class SearchFragment extends BaseSearchFragment implements SearchView, Vi
|
||||
SearchServiceHolder.INSTANCE.getFragmentManager().push(build);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 显示我的位置,并且可设置为家
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
package com.mogo.module.navi.ui.setting
|
||||
|
||||
import android.content.Context
|
||||
import android.media.AudioManager
|
||||
import android.os.Bundle
|
||||
import android.view.View
|
||||
import android.widget.CompoundButton
|
||||
@@ -8,6 +10,9 @@ import android.widget.SeekBar
|
||||
import android.widget.SeekBar.OnSeekBarChangeListener
|
||||
import com.alibaba.android.arouter.facade.annotation.Route
|
||||
import com.alibaba.android.arouter.launcher.ARouter
|
||||
import com.mogo.commons.analytics.AnalyticsUtils
|
||||
import com.mogo.map.constants.BroadcastMode
|
||||
import com.mogo.map.uicontroller.EnumMapUI
|
||||
import com.mogo.module.common.MogoModulePaths
|
||||
import com.mogo.module.navi.R
|
||||
import com.mogo.module.navi.constants.SearchServiceHolder
|
||||
@@ -32,6 +37,7 @@ import kotlinx.android.synthetic.main.fragment_navi_setting.rb_navi_no_high_way
|
||||
import kotlinx.android.synthetic.main.fragment_navi_setting.rg_navi_day_night
|
||||
import kotlinx.android.synthetic.main.fragment_navi_setting.rg_navi_sound_type
|
||||
import kotlinx.android.synthetic.main.fragment_navi_setting.sb_navi_volume_progress
|
||||
import java.util.HashMap
|
||||
|
||||
/**
|
||||
* @author zyz
|
||||
@@ -40,6 +46,8 @@ import kotlinx.android.synthetic.main.fragment_navi_setting.sb_navi_volume_progr
|
||||
@Route(path = MogoModulePaths.PATH_FRAGMENT_SETTING)
|
||||
class NaviSettingFragment : BaseFragment(), OnCheckedChangeListener {
|
||||
|
||||
private var type: Int = 0
|
||||
|
||||
override fun onCheckedChanged(
|
||||
buttonView: CompoundButton?,
|
||||
isChecked: Boolean
|
||||
@@ -47,22 +55,33 @@ class NaviSettingFragment : BaseFragment(), OnCheckedChangeListener {
|
||||
if (buttonView?.id == R.id.rb_navi_fee) {
|
||||
SettingManager.cost(isChecked)
|
||||
if (isChecked) {
|
||||
type = 2
|
||||
rb_navi_high_way.isChecked = false
|
||||
}
|
||||
} else if (buttonView?.id == R.id.rb_navi_high_way) {
|
||||
SettingManager.highSpeed(isChecked)
|
||||
type = 4
|
||||
|
||||
if (isChecked) {
|
||||
rb_navi_no_high_way.isChecked = false
|
||||
rb_navi_fee.isChecked = false
|
||||
}
|
||||
} else if (buttonView?.id == R.id.rb_navi_no_high_way) {
|
||||
SettingManager.avoidSpeed(isChecked)
|
||||
type = 3
|
||||
|
||||
if (isChecked) {
|
||||
rb_navi_high_way.isChecked = false
|
||||
}
|
||||
} else if (buttonView?.id == R.id.rb_navi_jam) {
|
||||
SettingManager.congestion(isChecked)
|
||||
type = 1
|
||||
|
||||
}
|
||||
if (isChecked) {
|
||||
AnalyticsUtils.track("Navigation_preference", mapOf("type" to type))
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
override fun getLayoutId(): Int {
|
||||
@@ -108,6 +127,10 @@ class NaviSettingFragment : BaseFragment(), OnCheckedChangeListener {
|
||||
rb_navi_no_high_way.setOnCheckedChangeListener(this)
|
||||
rb_navi_fee.setOnCheckedChangeListener(this)
|
||||
|
||||
var audioManager = activity?.getSystemService(Context.AUDIO_SERVICE) as AudioManager
|
||||
sb_navi_volume_progress.max = audioManager.getStreamMaxVolume(AudioManager.STREAM_MUSIC)
|
||||
sb_navi_volume_progress.progress = audioManager.getStreamVolume(AudioManager.STREAM_MUSIC)
|
||||
|
||||
|
||||
sb_navi_volume_progress.setOnSeekBarChangeListener(object : OnSeekBarChangeListener {
|
||||
override fun onProgressChanged(
|
||||
@@ -115,9 +138,9 @@ class NaviSettingFragment : BaseFragment(), OnCheckedChangeListener {
|
||||
progress: Int,
|
||||
fromUser: Boolean
|
||||
) {
|
||||
if (fromUser) {
|
||||
SettingManager.volume = progress
|
||||
}
|
||||
audioManager.setStreamVolume(
|
||||
AudioManager.STREAM_MUSIC, progress, AudioManager.FLAG_REMOVE_SOUND_AND_VIBRATE
|
||||
)
|
||||
}
|
||||
|
||||
override fun onStartTrackingTouch(seekBar: SeekBar?) {
|
||||
@@ -131,9 +154,35 @@ class NaviSettingFragment : BaseFragment(), OnCheckedChangeListener {
|
||||
|
||||
rg_navi_day_night.setOnCheckedChangeListener { group, checkedId ->
|
||||
SettingManager.mapType = checkedId
|
||||
|
||||
when (checkedId) {
|
||||
R.id.rb_navi_day -> {
|
||||
SearchServiceHolder.getMapUIController()
|
||||
.changeMapMode(EnumMapUI.Type_Night)
|
||||
}
|
||||
R.id.rb_navi_night -> {
|
||||
SearchServiceHolder.getMapUIController()
|
||||
.changeMapMode(EnumMapUI.Type_Light)
|
||||
}
|
||||
R.id.rb_navi_auto -> {
|
||||
SearchServiceHolder.getMapUIController()
|
||||
.changeMapMode(EnumMapUI.Type_AUTO_LIGHT_Night)
|
||||
}
|
||||
}
|
||||
}
|
||||
rg_navi_sound_type.setOnCheckedChangeListener { group, checkedId ->
|
||||
SettingManager.voiceStyle = checkedId
|
||||
SearchServiceHolder.getNavi()
|
||||
.setBroadcastMode(
|
||||
if (checkedId == R.id.rb_navi_detail) BroadcastMode.DETAIL else BroadcastMode.CONCISE
|
||||
)
|
||||
|
||||
|
||||
if (checkedId == R.id.rb_navi_detail) {
|
||||
AnalyticsUtils.track("Navigation_guide_type", mapOf("type" to 1))
|
||||
} else {
|
||||
AnalyticsUtils.track("Navigation_guide_type", mapOf("type" to 2))
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -16,6 +16,20 @@
|
||||
<include layout="@layout/include_search_bar" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="@dimen/dp_266"
|
||||
android:text="@string/search_action"
|
||||
android:layout_marginRight="@dimen/dp_8"
|
||||
android:gravity="center"
|
||||
android:id="@+id/tv_navi_search"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="@dimen/sp_40"
|
||||
android:background="@drawable/shape_round_blue_grident"
|
||||
app:layout_constraintRight_toRightOf="@+id/ll_navi_search"
|
||||
app:layout_constraintTop_toTopOf="@+id/ll_navi_search"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/ll_navi_search"
|
||||
android:layout_height="@dimen/dp_104"/>
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/ll_navi_home"
|
||||
android:layout_width="@dimen/dp_568"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<string name="navi_company">去公司</string>
|
||||
<string name="navi_restrant">餐馆</string>
|
||||
<string name="navi_gas">加油站</string>
|
||||
<string name="navi_toilet">卫生间</string>
|
||||
<string name="navi_toilet">厕所</string>
|
||||
<string name="navi_park">停车场</string>
|
||||
<string name="navi_wash">洗车</string>
|
||||
<string name="navi_setting">导航设置</string>
|
||||
@@ -14,6 +14,7 @@
|
||||
<string name="history_clear">清空历史</string>
|
||||
<string name="history_empty">暂无历史结果</string>
|
||||
<string name="search_empty">暂无搜索结果</string>
|
||||
<string name="search_action">搜索</string>
|
||||
<string name="preference_navi">路线偏好</string>
|
||||
<string name="navi_prefer_jam">躲避拥堵</string>
|
||||
<string name="navi_prefer_fee">躲避收费</string>
|
||||
|
||||
@@ -231,7 +231,7 @@ public class MarkerServiceHandler {
|
||||
}
|
||||
|
||||
}
|
||||
getMapUIController().changeZoom(12);
|
||||
getMapUIController().changeZoom(10);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -12,6 +12,7 @@ import androidx.annotation.Nullable;
|
||||
import androidx.constraintlayout.widget.ConstraintLayout;
|
||||
|
||||
import com.mogo.module.common.entity.MarkerOnlineCar;
|
||||
import com.mogo.module.common.entity.MarkerShareMusic;
|
||||
import com.mogo.module.common.entity.MarkerShowEntity;
|
||||
import com.mogo.module.service.R;
|
||||
import com.mogo.module.service.ServiceConst;
|
||||
@@ -79,13 +80,29 @@ public class MapMarkerInfoView extends MapMarkerBaseView {
|
||||
ivReverseTriangle.setImageResource(R.drawable.bg_shape_reverse_triangle_purple);
|
||||
}
|
||||
}
|
||||
loadImageWithMarker(markerShowEntity);
|
||||
break;
|
||||
case ServiceConst
|
||||
.CARD_TYPE_ROAD_CONDITION:
|
||||
break;
|
||||
case ServiceConst
|
||||
.CARD_TYPE_SHARE_MUSIC:
|
||||
ivIconForeground.setVisibility(View.VISIBLE);
|
||||
if (bindObj instanceof MarkerShareMusic) {
|
||||
// 2 为书籍听书,3 为新闻,1 为qq音乐,int
|
||||
switch (((MarkerShareMusic) bindObj).getShareType()) {
|
||||
case 1:
|
||||
ivUserHead.setImageResource(R.drawable.icon_map_marker_misic);
|
||||
break;
|
||||
case 2:
|
||||
ivUserHead.setImageResource(R.drawable.icon_map_marker_book);
|
||||
break;
|
||||
case 3:
|
||||
ivUserHead.setImageResource(R.drawable.icon_map_marker_news);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// ivIconForeground.setVisibility(View.VISIBLE);
|
||||
llMarkerContent.setBackgroundResource(R.drawable.bg_map_marker_purple_info);
|
||||
ivReverseTriangle.setImageResource(R.drawable.bg_shape_reverse_triangle_purple);
|
||||
break;
|
||||
@@ -95,7 +112,6 @@ public class MapMarkerInfoView extends MapMarkerBaseView {
|
||||
if (!TextUtils.isEmpty(markerShowEntity.getTextContent())) {
|
||||
tvMarkerContent.setText(markerShowEntity.getTextContent());
|
||||
}
|
||||
loadImageWithMarker(markerShowEntity);
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
|
||||
@@ -9,6 +9,7 @@ import android.widget.ImageView;
|
||||
import androidx.annotation.Nullable;
|
||||
|
||||
import com.mogo.module.common.entity.MarkerOnlineCar;
|
||||
import com.mogo.module.common.entity.MarkerShareMusic;
|
||||
import com.mogo.module.common.entity.MarkerShowEntity;
|
||||
import com.mogo.module.service.R;
|
||||
import com.mogo.module.service.ServiceConst;
|
||||
@@ -71,20 +72,34 @@ public class MapMarkerView extends MapMarkerBaseView {
|
||||
ivBg.setImageResource(R.drawable.bg_map_marker_purple);
|
||||
}
|
||||
}
|
||||
loadImageWithMarker(markerShowEntity);
|
||||
break;
|
||||
case ServiceConst
|
||||
.CARD_TYPE_ROAD_CONDITION:
|
||||
break;
|
||||
case ServiceConst
|
||||
.CARD_TYPE_SHARE_MUSIC:
|
||||
ivIconForeground.setVisibility(View.VISIBLE);
|
||||
if (bindObj instanceof MarkerShareMusic) {
|
||||
// 2 为书籍听书,3 为新闻,1 为qq音乐,int
|
||||
switch (((MarkerShareMusic) bindObj).getShareType()) {
|
||||
case 1:
|
||||
ivUserHead.setImageResource(R.drawable.icon_map_marker_misic);
|
||||
break;
|
||||
case 2:
|
||||
ivUserHead.setImageResource(R.drawable.icon_map_marker_book);
|
||||
break;
|
||||
case 3:
|
||||
ivUserHead.setImageResource(R.drawable.icon_map_marker_news);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// ivIconForeground.setVisibility(View.VISIBLE);
|
||||
ivBg.setImageResource(R.drawable.bg_map_marker_purple);
|
||||
break;
|
||||
}
|
||||
ivCar.setRotation((float) markerShowEntity.getMarkerLocation().getAngle());
|
||||
|
||||
loadImageWithMarker(markerShowEntity);
|
||||
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.7 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 905 B |
@@ -11,7 +11,7 @@
|
||||
android:id="@+id/ivCar"
|
||||
android:layout_width="@dimen/dp_34"
|
||||
android:layout_height="@dimen/dp_64"
|
||||
android:src="@drawable/icon_map_marker_car_blue"
|
||||
android:src="@drawable/icon_map_marker_car_gray"
|
||||
android:translationY="-5dp"
|
||||
app:layout_constraintEnd_toEndOf="@+id/ivBg"
|
||||
app:layout_constraintStart_toStartOf="@+id/ivBg"
|
||||
@@ -22,7 +22,7 @@
|
||||
android:layout_width="@dimen/dp_68"
|
||||
android:layout_height="@dimen/dp_85"
|
||||
android:layout_gravity="center"
|
||||
android:src="@drawable/bg_map_marker_blue"
|
||||
android:src="@drawable/bg_map_marker_green"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
@@ -33,7 +33,6 @@
|
||||
android:layout_height="@dimen/dp_56"
|
||||
android:layout_gravity="center"
|
||||
android:layout_marginTop="@dimen/dp_6"
|
||||
android:background="@drawable/icon_default"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
android:id="@+id/ivCar"
|
||||
android:layout_width="@dimen/dp_34"
|
||||
android:layout_height="@dimen/dp_64"
|
||||
android:src="@drawable/icon_map_marker_car_blue"
|
||||
android:src="@drawable/icon_map_marker_car_gray"
|
||||
android:translationY="-5dp"
|
||||
app:layout_constraintEnd_toEndOf="@+id/ivReverseTriangle"
|
||||
app:layout_constraintStart_toStartOf="@+id/ivReverseTriangle"
|
||||
@@ -31,7 +31,6 @@
|
||||
android:id="@+id/ivUserHead"
|
||||
android:layout_width="@dimen/dp_60"
|
||||
android:layout_height="@dimen/dp_60"
|
||||
android:background="@drawable/icon_default"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:miv_failureHolder="@drawable/icon_default"
|
||||
|
||||
Reference in New Issue
Block a user