调整UI
This commit is contained in:
@@ -149,7 +149,6 @@ class CategorySearchFragment : BaseFragment(), CategoryView {
|
||||
lifecycle.removeObserver(mSearchPresenter)
|
||||
SearchServiceHolder.getMarkerManger()
|
||||
.removeMarkers(TAG)
|
||||
moveMapToCenter()
|
||||
}
|
||||
|
||||
override fun onDestroy() {
|
||||
|
||||
@@ -221,6 +221,7 @@ class ChoosePathFragment : BaseFragment(), IMogoNaviListener, IMogoVoiceCmdCallB
|
||||
.recoverLockMode()
|
||||
isStartedNavi = true
|
||||
SearchServiceHolder.fragmentManager.clearAll()
|
||||
moveMapToRight()
|
||||
}
|
||||
|
||||
private fun selectPath(item: MogoCalculatePath?) {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user