|
|
@@ -4,11 +4,13 @@ import com.fujica.abk.ResourceTable;
|
|
|
import com.fujica.abk.model.out.ParkNearRes;
|
|
|
import com.fujica.abk.utils.Log;
|
|
|
import com.fujica.abk.utils.ScreenUtil;
|
|
|
+import ohos.aafwk.content.Intent;
|
|
|
import ohos.agp.colors.RgbColor;
|
|
|
import ohos.agp.components.*;
|
|
|
import ohos.agp.components.element.ShapeElement;
|
|
|
import ohos.agp.utils.Color;
|
|
|
import ohos.app.Context;
|
|
|
+import ohos.utils.net.Uri;
|
|
|
|
|
|
/**
|
|
|
* 停车场列表项组件
|
|
|
@@ -182,6 +184,13 @@ public class ParkItemComponent extends DirectionalLayout {
|
|
|
Image navButton = (Image) rootLayout.findComponentById(ResourceTable.Id_btn_navigate);
|
|
|
if (navButton != null) {
|
|
|
navButton.setClickedListener(component -> {
|
|
|
+
|
|
|
+// Uri content_url = Uri.parse("petalmaps://navigation?saddr=25.102916,55.165363&daddr=25.164610000000,55.228869000000&type=drive&utm_source=fb");
|
|
|
+// Intent intent = new Intent(Intent.ACTION_VIEW, content_url);
|
|
|
+// if (intent.resolveActivity(getPackageManager()) != null) {
|
|
|
+// startActivity(intent);
|
|
|
+// }
|
|
|
+
|
|
|
// 导航功能
|
|
|
Log.info("导航到: " + parkData.getParkName());
|
|
|
// TODO: 实现导航功能
|