修复bug
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="com.mogo.module.navi">
|
||||
|
||||
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/>
|
||||
|
||||
<application>
|
||||
<activity android:name=".ui.NaviActivity"></activity>
|
||||
<provider
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.mogo.module.navi.manager
|
||||
|
||||
import android.app.SearchManager
|
||||
import android.content.BroadcastReceiver
|
||||
import android.content.Context
|
||||
import android.content.Intent
|
||||
@@ -11,8 +12,8 @@ import com.mogo.module.navi.constants.SearchServiceHolder
|
||||
import com.mogo.module.navi.ui.search.ChoosePathFragment
|
||||
import com.mogo.utils.logger.Logger
|
||||
import androidx.core.content.ContextCompat.startActivity
|
||||
|
||||
|
||||
import com.mogo.module.navi.ui.search.SearchFragment
|
||||
import com.mogo.service.fragmentmanager.FragmentDescriptor
|
||||
|
||||
/**
|
||||
*@author zyz
|
||||
@@ -51,6 +52,16 @@ object NaviManager {
|
||||
showHome()
|
||||
SearchServiceHolder.fragmentManager
|
||||
.clearAll()
|
||||
|
||||
val searchFragment = SearchFragment()
|
||||
SearchServiceHolder.fragmentManager
|
||||
.push(
|
||||
FragmentDescriptor.Builder().fragment(searchFragment)
|
||||
.tag(MogoModulePaths.PATH_FRAGMENT_SEARCH)
|
||||
.notifyMainModule(true)
|
||||
.build()
|
||||
)
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ class CategorySearchFragment : BaseFragment(), CategoryView {
|
||||
.icon(createWaterMask)
|
||||
.latitude(datums[index].point?.lat ?: 0.0)
|
||||
.owner("CategorySearchFragment")
|
||||
.anchor(0.5f, 1f)
|
||||
// .anchor(0.5f, 1f)
|
||||
.longitude(datums[index].point?.lng ?: 0.0)
|
||||
arrayList.add(options)
|
||||
}
|
||||
@@ -134,7 +134,7 @@ class CategorySearchFragment : BaseFragment(), CategoryView {
|
||||
BitmapUtils.createWaterMask(
|
||||
context, decodeResource, (index+1).toString(), R.color.white, 18
|
||||
)
|
||||
return decodeResource
|
||||
return createWaterMask
|
||||
}
|
||||
|
||||
override fun onActivityCreated(savedInstanceState: Bundle?) {
|
||||
|
||||
@@ -17,6 +17,10 @@ public class BitmapUtils {
|
||||
paint.setColor(ContextCompat.getColor(context, textColor));
|
||||
paint.setTextSize(dp2px(context, textSize));
|
||||
|
||||
paint.setDither(true); // 获取跟清晰的图像采样
|
||||
paint.setFilterBitmap(true);// 过滤一些
|
||||
|
||||
|
||||
int width = src.getWidth();
|
||||
int height = src.getHeight();
|
||||
//创建一个bitmap
|
||||
@@ -27,20 +31,19 @@ public class BitmapUtils {
|
||||
////将该图片作为画布
|
||||
//Canvas canvas = new Canvas(newb);
|
||||
////在画布 0,0坐标上开始绘制原始图片
|
||||
//canvas.drawBitmap(src, 0, 0, null);
|
||||
Bitmap.Config config = src.getConfig();
|
||||
|
||||
if (config == null) {
|
||||
config = android.graphics.Bitmap.Config.ARGB_8888;
|
||||
}
|
||||
// 绘制文字
|
||||
|
||||
|
||||
|
||||
Bitmap ret = src.copy(src.getConfig(), true);
|
||||
Bitmap ret = src.copy(config, 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.restore();
|
||||
// 存储
|
||||
return ret;
|
||||
}
|
||||
|
||||
BIN
modules/mogo-module-search/src/main/res/mipmap-ldpi/icon_search_category_checked.png
Executable file → Normal file
BIN
modules/mogo-module-search/src/main/res/mipmap-ldpi/icon_search_category_checked.png
Executable file → Normal file
Binary file not shown.
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.6 KiB |
BIN
modules/mogo-module-search/src/main/res/mipmap-ldpi/icon_search_category_unchecked.png
Executable file → Normal file
BIN
modules/mogo-module-search/src/main/res/mipmap-ldpi/icon_search_category_unchecked.png
Executable file → Normal file
Binary file not shown.
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.3 KiB |
Reference in New Issue
Block a user