diff --git a/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/AMapNaviViewWrapper.java b/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/AMapNaviViewWrapper.java
index 3bb667fda2..c9bb2505b9 100644
--- a/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/AMapNaviViewWrapper.java
+++ b/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/AMapNaviViewWrapper.java
@@ -533,6 +533,18 @@ public class AMapNaviViewWrapper implements IMogoMapView,
return null;
}
+ @Override
+ public MogoLatLng getLocationMogoLatLngInScreen(Point point) {
+ if ( checkAMapView() ) {
+ try {
+ return ObjectUtils.fromAMap(mMapView.getMap().getProjection().fromScreenLocation( point ));
+ } catch ( Exception e ) {
+ return null;
+ }
+ }
+ return null;
+ }
+
@Override
public void startJumpAnimation( IMogoMarker marker, float high, Interpolator interpolator, long duration ) {
if ( marker == null || high <= 0.0f || interpolator == null || duration < 0 ) {
diff --git a/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/marker/AMapMarkerWrapper.java b/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/marker/AMapMarkerWrapper.java
index c36b011c69..c811a6860f 100644
--- a/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/marker/AMapMarkerWrapper.java
+++ b/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/marker/AMapMarkerWrapper.java
@@ -1,14 +1,18 @@
package com.mogo.map.impl.amap.marker;
+import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Point;
import android.view.View;
+import android.view.animation.Interpolator;
import com.amap.api.maps.model.BitmapDescriptor;
import com.amap.api.maps.model.BitmapDescriptorFactory;
import com.amap.api.maps.model.LatLng;
import com.amap.api.maps.model.Marker;
import com.amap.api.maps.model.MarkerOptions;
+import com.amap.api.maps.model.animation.Animation;
+import com.amap.api.maps.model.animation.TranslateAnimation;
import com.mogo.map.MogoLatLng;
import com.mogo.map.impl.amap.utils.ObjectUtils;
import com.mogo.map.marker.IMogoInfoWindowAdapter;
@@ -16,6 +20,8 @@ import com.mogo.map.marker.IMogoMarker;
import com.mogo.map.marker.IMogoMarkerClickListener;
import com.mogo.map.marker.IMogoMarkerIconViewCreator;
import com.mogo.map.marker.MogoMarkerOptions;
+import com.mogo.utils.WindowUtils;
+import com.mogo.utils.logger.Logger;
import java.util.ArrayList;
import java.util.Observable;
@@ -29,6 +35,8 @@ import java.util.Observer;
*/
public class AMapMarkerWrapper implements IMogoMarker, Observer {
+ private final String TAG = AMapMarkerWrapper.class.getName();
+
private Marker mMarker;
private Object mObject;
private IMogoMarkerClickListener mMogoMarkerClickListener;
diff --git a/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/uicontroller/AMapUIController.java b/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/uicontroller/AMapUIController.java
index 0df050bb3d..72da50a6ba 100644
--- a/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/uicontroller/AMapUIController.java
+++ b/libraries/map-amap/src/main/java/com/mogo/map/impl/amap/uicontroller/AMapUIController.java
@@ -156,6 +156,14 @@ public class AMapUIController implements IMogoMapUIController {
return null;
}
+ @Override
+ public MogoLatLng getLocationMogoLatLngInScreen(Point point) {
+ if ( mClient != null ) {
+ return mClient.getLocationMogoLatLngInScreen( point );
+ }
+ return null;
+ }
+
@Override
public void startJumpAnimation( IMogoMarker marker, float high, Interpolator interpolator, long duration ) {
if ( mClient != null ) {
diff --git a/libraries/mogo-map-api/src/main/java/com/mogo/map/marker/IMogoMarker.java b/libraries/mogo-map-api/src/main/java/com/mogo/map/marker/IMogoMarker.java
index 881ff0fbc9..9eeca2123d 100644
--- a/libraries/mogo-map-api/src/main/java/com/mogo/map/marker/IMogoMarker.java
+++ b/libraries/mogo-map-api/src/main/java/com/mogo/map/marker/IMogoMarker.java
@@ -1,7 +1,9 @@
package com.mogo.map.marker;
+import android.content.Context;
import android.graphics.Bitmap;
import android.graphics.Point;
+import android.view.animation.Interpolator;
import com.mogo.map.MogoLatLng;
diff --git a/libraries/mogo-map-api/src/main/java/com/mogo/map/uicontroller/IMogoMapUIController.java b/libraries/mogo-map-api/src/main/java/com/mogo/map/uicontroller/IMogoMapUIController.java
index 4d269020d1..8b854d2844 100644
--- a/libraries/mogo-map-api/src/main/java/com/mogo/map/uicontroller/IMogoMapUIController.java
+++ b/libraries/mogo-map-api/src/main/java/com/mogo/map/uicontroller/IMogoMapUIController.java
@@ -115,6 +115,14 @@ public interface IMogoMapUIController {
*/
Point getLocationPointInScreen( MogoLatLng latLng );
+ /**
+ * 获取像素点对应的经纬度
+ *
+ * @param point
+ * @return
+ */
+ MogoLatLng getLocationMogoLatLngInScreen( Point point );
+
/**
* marker 跳跃动画
*
diff --git a/libraries/mogo-map/src/main/java/com/mogo/map/MogoMapUIController.java b/libraries/mogo-map/src/main/java/com/mogo/map/MogoMapUIController.java
index d664bb8a22..05634e5b08 100644
--- a/libraries/mogo-map/src/main/java/com/mogo/map/MogoMapUIController.java
+++ b/libraries/mogo-map/src/main/java/com/mogo/map/MogoMapUIController.java
@@ -149,6 +149,14 @@ public class MogoMapUIController implements IMogoMapUIController {
return null;
}
+ @Override
+ public MogoLatLng getLocationMogoLatLngInScreen(Point point) {
+ if (mDelegate != null) {
+ return mDelegate.getLocationMogoLatLngInScreen(point);
+ }
+ return null;
+ }
+
@Override
public void startJumpAnimation( IMogoMarker marker, float high, Interpolator interpolator, long duration ) {
if ( mDelegate != null ) {
diff --git a/modules/mogo-module-back/src/main/java/com/mogo/module/back/utils/WindowViewHandler.java b/modules/mogo-module-back/src/main/java/com/mogo/module/back/utils/WindowViewHandler.java
index 329ce1863e..bbd48717cd 100644
--- a/modules/mogo-module-back/src/main/java/com/mogo/module/back/utils/WindowViewHandler.java
+++ b/modules/mogo-module-back/src/main/java/com/mogo/module/back/utils/WindowViewHandler.java
@@ -86,7 +86,7 @@ public interface WindowViewHandler {
if ( mWindowView == null ) {
return;
}
- /* WindowManager wm = ( ( WindowManager ) mWindowView.getContext().getSystemService( Context.WINDOW_SERVICE ) );
+ WindowManager wm = ( ( WindowManager ) mWindowView.getContext().getSystemService( Context.WINDOW_SERVICE ) );
if ( mParams.x > WindowUtils.getScreenWidth( AbsMogoApplication.getApp() ) / 2 ) {
mParams.x = WindowUtils.getScreenWidth( AbsMogoApplication.getApp() ) - mWindowView.getMeasuredWidth();
@@ -94,7 +94,7 @@ public interface WindowViewHandler {
mParams.x = 0;
}
- wm.updateViewLayout( mWindowView, alignLayoutParamsBoundary( mParams ) );*/
+ wm.updateViewLayout( mWindowView, alignLayoutParamsBoundary( mParams ) );
}
protected WindowManager.LayoutParams alignLayoutParamsBoundary( WindowManager.LayoutParams params ) {
diff --git a/modules/mogo-module-main/src/main/res/values/styles.xml b/modules/mogo-module-main/src/main/res/values/styles.xml
index 4b9d268b74..7b786720a0 100644
--- a/modules/mogo-module-main/src/main/res/values/styles.xml
+++ b/modules/mogo-module-main/src/main/res/values/styles.xml
@@ -10,6 +10,8 @@
- @color/module_main_window_background_color
- false
- @style/MainAnimation
+ - @style/noCheckboxStyle
+ - @style/noCheckboxStyle
+
+
+
+
+
+
\ No newline at end of file
diff --git a/modules/mogo-module-search/src/main/java/com/mogo/module/navi/ui/search/CategorySearchFragment.kt b/modules/mogo-module-search/src/main/java/com/mogo/module/navi/ui/search/CategorySearchFragment.kt
index 3c5b6b13e5..8e59791dd0 100644
--- a/modules/mogo-module-search/src/main/java/com/mogo/module/navi/ui/search/CategorySearchFragment.kt
+++ b/modules/mogo-module-search/src/main/java/com/mogo/module/navi/ui/search/CategorySearchFragment.kt
@@ -18,10 +18,10 @@ import com.mogo.module.navi.ui.adapter.SearchCategoryAdapter
import com.mogo.module.navi.ui.base.BaseFragment
import com.mogo.module.navi.uitls.BitmapUtils
import kotlinx.android.synthetic.main.fragment_search_category.cv_search_result
+import kotlinx.android.synthetic.main.fragment_search_category.et_navi_search
+import kotlinx.android.synthetic.main.fragment_search_category.iv_navi_back
import kotlinx.android.synthetic.main.fragment_search_category.rv_search_result
import kotlinx.android.synthetic.main.fragment_search_category.tv_navi_navi
-import kotlinx.android.synthetic.main.include_search_bar.et_navi_search
-import kotlinx.android.synthetic.main.include_search_bar.iv_navi_back
/**
* @author zyz
@@ -134,7 +134,7 @@ class CategorySearchFragment : BaseFragment(), CategoryView {
BitmapUtils.createWaterMask(
context, decodeResource, (index+1).toString(), R.color.white, 18
)
- return createWaterMask
+ return decodeResource
}
override fun onActivityCreated(savedInstanceState: Bundle?) {
diff --git a/modules/mogo-module-search/src/main/java/com/mogo/module/navi/ui/search/ChoosePathFragment.kt b/modules/mogo-module-search/src/main/java/com/mogo/module/navi/ui/search/ChoosePathFragment.kt
index ed6910f43c..d8ef97cacd 100644
--- a/modules/mogo-module-search/src/main/java/com/mogo/module/navi/ui/search/ChoosePathFragment.kt
+++ b/modules/mogo-module-search/src/main/java/com/mogo/module/navi/ui/search/ChoosePathFragment.kt
@@ -15,6 +15,7 @@ import com.mogo.map.navi.MogoNaviInfo
import com.mogo.map.navi.MogoTraffic
import com.mogo.map.search.inputtips.MogoTip
import com.mogo.module.common.MogoModulePaths
+import com.mogo.module.navi.BuildConfig
import com.mogo.module.navi.R
import com.mogo.module.navi.constants.AMapConstants
import com.mogo.module.navi.constants.SearchServiceHolder
@@ -123,15 +124,6 @@ class ChoosePathFragment : BaseFragment(), IMogoNaviListener, IMogoVoiceCmdCallB
MogoModulePaths.PATH_FRAGMENT_CHOOSE_PAHT, true
)
- AIAssist.getInstance(context)
- .registerUnWakeupCommand("firstPath", arrayOf(firstPath), this)
- AIAssist.getInstance(context)
- .registerUnWakeupCommand("secondPath", arrayOf(secondPath), this)
- AIAssist.getInstance(context)
- .registerUnWakeupCommand("thirdPath", arrayOf(thirdPath), this)
- AIAssist.getInstance(context)
- .registerUnWakeupCommand("startNavi", arrayOf(startNavi), this)
-
}
// 是否开启导航
@@ -182,11 +174,24 @@ class ChoosePathFragment : BaseFragment(), IMogoNaviListener, IMogoVoiceCmdCallB
SearchServiceHolder.getMarkerManger()
.removeMarkers()
+
+
+
+ AIAssist.getInstance(context)
+ .registerUnWakeupCommand("firstPath", arrayOf(firstPath), this)
+ AIAssist.getInstance(context)
+ .registerUnWakeupCommand("secondPath", arrayOf(secondPath), this)
+ AIAssist.getInstance(context)
+ .registerUnWakeupCommand("thirdPath", arrayOf(thirdPath), this)
+ AIAssist.getInstance(context)
+ .registerUnWakeupCommand("startNavi", arrayOf(startNavi), this)
+
+
}
private fun startNavi() {
SearchServiceHolder.getNavi()
- .startNavi(false)
+ .startNavi(!BuildConfig.DEBUG)
SearchServiceHolder.getMapUIController()
.recoverLockMode()
isStartedNavi = true
diff --git a/modules/mogo-module-search/src/main/java/com/mogo/module/navi/uitls/BitmapUtils.java b/modules/mogo-module-search/src/main/java/com/mogo/module/navi/uitls/BitmapUtils.java
index 7baf31fd2e..c34491e890 100644
--- a/modules/mogo-module-search/src/main/java/com/mogo/module/navi/uitls/BitmapUtils.java
+++ b/modules/mogo-module-search/src/main/java/com/mogo/module/navi/uitls/BitmapUtils.java
@@ -22,19 +22,27 @@ public class BitmapUtils {
//创建一个bitmap
Rect bounds = new Rect();
paint.getTextBounds(text, 0, text.length(), bounds);
- // 创建一个新的和SRC长度宽度一样的位图
- Bitmap newb = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
- //将该图片作为画布
- Canvas canvas = new Canvas(newb);
- //在画布 0,0坐标上开始绘制原始图片
- canvas.drawBitmap(src, 0, 0, null);
+ //// 创建一个新的和SRC长度宽度一样的位图
+ //Bitmap newb = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888);
+ ////将该图片作为画布
+ //Canvas canvas = new Canvas(newb);
+ ////在画布 0,0坐标上开始绘制原始图片
+ //canvas.drawBitmap(src, 0, 0, null);
// 绘制文字
+
+
+
+ Bitmap ret = src.copy(src.getConfig(), true);
+ //Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);
+ Canvas canvas = new Canvas(ret);
+
+
+
canvas.drawText(text, (width-bounds.width())/2.0F, (float) ( bounds.height()*1.8), paint);
// 保存
- canvas.save();
+ //canvas.save();
// 存储
- canvas.restore();
- return newb;
+ return ret;
}
public static int dp2px(Context context, float dp) {
diff --git a/modules/mogo-module-search/src/main/res/layout/fragment_search_category.xml b/modules/mogo-module-search/src/main/res/layout/fragment_search_category.xml
index 81dc1ca8a0..bb230c92de 100644
--- a/modules/mogo-module-search/src/main/res/layout/fragment_search_category.xml
+++ b/modules/mogo-module-search/src/main/res/layout/fragment_search_category.xml
@@ -13,6 +13,7 @@
-
-
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/modules/mogo-module-search/src/main/res/mipmap-ldpi/icon_search_category_checked.png b/modules/mogo-module-search/src/main/res/mipmap-ldpi/icon_search_category_checked.png
index a89d92e306..250128bb4b 100755
Binary files a/modules/mogo-module-search/src/main/res/mipmap-ldpi/icon_search_category_checked.png and b/modules/mogo-module-search/src/main/res/mipmap-ldpi/icon_search_category_checked.png differ
diff --git a/modules/mogo-module-search/src/main/res/mipmap-ldpi/icon_search_category_unchecked.png b/modules/mogo-module-search/src/main/res/mipmap-ldpi/icon_search_category_unchecked.png
index 392d5c34cb..a9e3e03a60 100755
Binary files a/modules/mogo-module-search/src/main/res/mipmap-ldpi/icon_search_category_unchecked.png and b/modules/mogo-module-search/src/main/res/mipmap-ldpi/icon_search_category_unchecked.png differ
diff --git a/modules/mogo-module-search/src/main/res/values/styles.xml b/modules/mogo-module-search/src/main/res/values/styles.xml
index 22cadcf686..a3f67638ff 100644
--- a/modules/mogo-module-search/src/main/res/values/styles.xml
+++ b/modules/mogo-module-search/src/main/res/values/styles.xml
@@ -29,7 +29,7 @@