This commit is contained in:
zhangyuanzhen
2020-02-26 15:10:50 +08:00
parent c8c903bf67
commit af878a7bfe
5 changed files with 27 additions and 7 deletions

View File

@@ -149,7 +149,6 @@ class CategorySearchFragment : BaseFragment(), CategoryView {
lifecycle.removeObserver(mSearchPresenter)
SearchServiceHolder.getMarkerManger()
.removeMarkers(TAG)
moveMapToCenter()
}
override fun onDestroy() {

View File

@@ -221,6 +221,7 @@ class ChoosePathFragment : BaseFragment(), IMogoNaviListener, IMogoVoiceCmdCallB
.recoverLockMode()
isStartedNavi = true
SearchServiceHolder.fragmentManager.clearAll()
moveMapToRight()
}
private fun selectPath(item: MogoCalculatePath?) {

View File

@@ -42,12 +42,28 @@ public class BitmapUtils {
Canvas canvas = new Canvas(ret);
int i = Integer.parseInt(text);
if (i == 1) {
canvas.drawText(text, (width - bounds.width()*2) / 2.0F, (float) (bounds.height() * 1.8),
paint);
if (isLow(context)) {
if (i == 1) {
canvas.drawText(text, (width - bounds.width() * 2) / 2.0F,
(float) (bounds.height() * 2.4),
paint);
} else {
canvas.drawText(text, (width - bounds.width()) / 2.0F,
(float) (bounds.height() * 1.9),
paint);
}
} else {
canvas.drawText(text, (width - bounds.width()) / 2.0F, (float) (bounds.height() * 1.8),
if (i == 1) {
canvas.drawText(text, (width - bounds.width()*1.5F) / 2.0F,
(float) (bounds.height() * 1.9),
paint);
}else {
canvas.drawText(text, (width - bounds.width()*1.2F) / 2.0F,
(float) (bounds.height() * 1.9),
paint);
}
}
// 保存
@@ -61,4 +77,8 @@ public class BitmapUtils {
final float scale = context.getResources().getDisplayMetrics().density;
return (int) (dp * scale + 0.5f);
}
public static boolean isLow(Context context) {
return context.getResources().getDisplayMetrics().density < 1;
}
}