Merge branch 'feature/v1.0.0' of gitlab.zhidaoauto.com:ecos/yycp-service/Launcher into feature/v1.0.0
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 16 KiB |
@@ -74,6 +74,8 @@ dependencies {
|
||||
// implementation project(':modules:mogo-module-map')
|
||||
}
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||
|
||||
|
||||
}
|
||||
|
||||
apply from: new File(rootProject.rootDir, "gradle/upload.gradle").toString()
|
||||
|
||||
@@ -34,9 +34,17 @@ object NaviManager {
|
||||
val key_type = intent.getIntExtra("KEY_TYPE", 0)
|
||||
Logger.d("NaviManager","key_type"+key_type,null)
|
||||
if (key_type == 10038||key_type == 10007) {
|
||||
val lat = intent.getDoubleExtra("LAT", 0.0)
|
||||
val lon = intent.getDoubleExtra("LON", 0.0)
|
||||
val lat: Double
|
||||
val lon: Double
|
||||
|
||||
if (key_type==10007){
|
||||
lat = intent.getDoubleExtra("ENTRY_LAT", 0.0)
|
||||
lon = intent.getDoubleExtra("ENTRY_LON", 0.0)
|
||||
}else{
|
||||
lat = intent.getDoubleExtra("LAT", 0.0)
|
||||
lon = intent.getDoubleExtra("LON", 0.0)
|
||||
|
||||
}
|
||||
showHome()
|
||||
|
||||
var newInstance =
|
||||
|
||||
@@ -22,6 +22,7 @@ import com.mogo.module.navi.constants.AMapConstants
|
||||
import com.mogo.module.navi.constants.SearchServiceHolder
|
||||
import com.mogo.module.navi.ui.adapter.CalculatePathAdapter
|
||||
import com.mogo.module.navi.ui.base.BaseFragment
|
||||
import kotlinx.android.synthetic.main.fragment_search_category.group_path
|
||||
import kotlinx.android.synthetic.main.fragment_search_category.pb_path
|
||||
import kotlinx.android.synthetic.main.fragment_search_category.rv_search_result
|
||||
import kotlinx.android.synthetic.main.fragment_search_category.tv_navi_navi
|
||||
@@ -55,7 +56,7 @@ class ChoosePathFragment : BaseFragment(), IMogoNaviListener, IMogoVoiceCmdCallB
|
||||
startNavi()
|
||||
}
|
||||
|
||||
"cancel"->{
|
||||
"cancel" -> {
|
||||
SearchServiceHolder.fragmentManager
|
||||
.clearAll()
|
||||
}
|
||||
@@ -105,11 +106,17 @@ class ChoosePathFragment : BaseFragment(), IMogoNaviListener, IMogoVoiceCmdCallB
|
||||
mAdapter.setDatas(calculatedStrategies)
|
||||
mAdapter.selectTag = calculatedStrategies[0].tagId
|
||||
}
|
||||
pb_path.visibility=View.GONE
|
||||
pb_path.visibility = View.GONE
|
||||
group_path.visibility = View.GONE
|
||||
tv_navi_navi.text = getString(R.string.navi_to_there)
|
||||
|
||||
}
|
||||
|
||||
override fun onoCalculateFailed() {
|
||||
group_path.visibility = View.VISIBLE
|
||||
tv_navi_navi.text = "重试"
|
||||
pb_path.visibility=View.GONE
|
||||
|
||||
}
|
||||
|
||||
override fun onUpdateTraffic(traffic: MogoTraffic?) {
|
||||
@@ -165,7 +172,15 @@ class ChoosePathFragment : BaseFragment(), IMogoNaviListener, IMogoVoiceCmdCallB
|
||||
|
||||
rv_search_result.adapter = mAdapter
|
||||
tv_navi_navi.setOnClickListener {
|
||||
startNavi()
|
||||
|
||||
if (group_path.visibility == View.VISIBLE) {
|
||||
SearchServiceHolder.getNavi()
|
||||
.naviTo(mogoTip)
|
||||
pb_path.visibility=View.VISIBLE
|
||||
group_path.visibility=View.GONE
|
||||
} else {
|
||||
startNavi()
|
||||
}
|
||||
}
|
||||
|
||||
SearchServiceHolder.getNavi()
|
||||
@@ -195,8 +210,7 @@ class ChoosePathFragment : BaseFragment(), IMogoNaviListener, IMogoVoiceCmdCallB
|
||||
AIAssist.getInstance(context)
|
||||
.registerUnWakeupCommand("startNavi", arrayOf<String>(startNavi), this)
|
||||
AIAssist.getInstance(context)
|
||||
.registerUnWakeupCommand("cancel", arrayOf<String>("取消","退出","返回","退出导航","取消导航"), this)
|
||||
|
||||
.registerUnWakeupCommand("cancel", arrayOf<String>("取消", "退出", "返回", "退出导航", "取消导航"), this)
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,8 @@ import androidx.core.content.ContextCompat;
|
||||
* 2020-01-13.
|
||||
*/
|
||||
public class BitmapUtils {
|
||||
public static Bitmap createWaterMask(Context context, Bitmap src, String text, int textColor, int textSize) {
|
||||
public static Bitmap createWaterMask(Context context, Bitmap src, String text, int textColor,
|
||||
int textSize) {
|
||||
Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
paint.setColor(ContextCompat.getColor(context, textColor));
|
||||
paint.setTextSize(dp2px(context, textSize));
|
||||
@@ -20,7 +21,6 @@ public class BitmapUtils {
|
||||
paint.setDither(true); // 获取跟清晰的图像采样
|
||||
paint.setFilterBitmap(true);// 过滤一些
|
||||
|
||||
|
||||
int width = src.getWidth();
|
||||
int height = src.getHeight();
|
||||
//创建一个bitmap
|
||||
@@ -40,7 +40,16 @@ public class BitmapUtils {
|
||||
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);
|
||||
|
||||
int i = Integer.parseInt(text);
|
||||
if (i == 1) {
|
||||
canvas.drawText(text, (width - bounds.width()*2) / 2.0F, (float) (bounds.height() * 1.8),
|
||||
paint);
|
||||
} else {
|
||||
canvas.drawText(text, (width - bounds.width()) / 2.0F, (float) (bounds.height() * 1.8),
|
||||
paint);
|
||||
}
|
||||
|
||||
// 保存
|
||||
//canvas.save();
|
||||
//canvas.restore();
|
||||
|
||||
@@ -64,6 +64,38 @@
|
||||
/>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
|
||||
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/iv_path_fail"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/cv_search_result"
|
||||
app:layout_constraintRight_toRightOf="@+id/cv_search_result"
|
||||
app:layout_constraintTop_toTopOf="@+id/cv_search_result"
|
||||
android:layout_width="@dimen/module_search_dp_120"
|
||||
android:src="@mipmap/icon_path_fail"
|
||||
android:layout_marginTop="@dimen/dp_224"
|
||||
android:layout_height="@dimen/module_search_dp_120"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/tv_path_notice"
|
||||
app:layout_constraintLeft_toLeftOf="@+id/cv_search_result"
|
||||
app:layout_constraintRight_toRightOf="@+id/cv_search_result"
|
||||
app:layout_constraintTop_toBottomOf="@+id/iv_path_fail"
|
||||
android:layout_width="wrap_content"
|
||||
android:textColor="@color/white"
|
||||
android:text="路线计算失败"
|
||||
android:textSize="@dimen/dp_44"
|
||||
android:layout_marginTop="@dimen/dp_32"
|
||||
android:layout_height="wrap_content"/>
|
||||
|
||||
<androidx.constraintlayout.widget.Group
|
||||
android:layout_width="wrap_content"
|
||||
android:id="@+id/group_path"
|
||||
android:visibility="gone"
|
||||
android:layout_height="wrap_content"
|
||||
app:constraint_referenced_ids="iv_path_fail,tv_path_notice"/>
|
||||
|
||||
<LinearLayout
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/ll_navi_search"
|
||||
|
||||
BIN
modules/mogo-module-search/src/main/res/mipmap-ldpi/icon_path_fail.png
Executable file
BIN
modules/mogo-module-search/src/main/res/mipmap-ldpi/icon_path_fail.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 3.7 KiB |
BIN
modules/mogo-module-search/src/main/res/mipmap-xhdpi/icon_path_fail.png
Executable file
BIN
modules/mogo-module-search/src/main/res/mipmap-xhdpi/icon_path_fail.png
Executable file
Binary file not shown.
|
After Width: | Height: | Size: 8.4 KiB |
Reference in New Issue
Block a user