فهرست منبع

1.修改Apex Drivers,增加地图导航。
2.修改Apex Drivers Listview分割线不显示。

Pen Li 7 سال پیش
والد
کامیت
e1fbee0ba3

+ 11 - 2
ApexDrivers/app/src/main/java/com/usai/redant/apexdrivers/Detail/DetailActivity.java

@@ -6,6 +6,7 @@ import android.content.Intent;
 import android.graphics.Color;
 import android.graphics.drawable.BitmapDrawable;
 import android.graphics.drawable.ColorDrawable;
+import android.net.Uri;
 import android.os.Handler;
 import android.os.Message;
 import android.support.annotation.NonNull;
@@ -28,6 +29,7 @@ import android.widget.ListView;
 import android.widget.PopupWindow;
 import android.widget.SimpleAdapter;
 import android.widget.TextView;
+import android.widget.Toast;
 
 import com.usai.redant.apexdrivers.Detail.Model.DetailActionSelectionModel;
 import com.usai.redant.apexdrivers.Detail.Model.DetailLocationModel;
@@ -97,8 +99,6 @@ public class DetailActivity extends AppCompatActivity implements DetailAdapter.D
         mAdapter = new DetailAdapter(mCtx,self,mSectionArray);
 
         mListView.setAdapter(mAdapter);
-        mListView.setDivider(new ColorDrawable(Color.GRAY));
-        mListView.setDividerHeight(RAUtil.dp2px(mCtx,1));
         mListView.setGroupIndicator(null);
 
         mRefresh = findViewById(R.id.detail_refresh);
@@ -225,6 +225,15 @@ public class DetailActivity extends AppCompatActivity implements DetailAdapter.D
     @Override
     public void navigationTo(DetailLocationModel locationModel) {
 
+        Uri gmmIntentUri = Uri.parse("google.navigation:q=" + locationModel.location + "&mode=d");
+        Intent mapIntent = new Intent(Intent.ACTION_VIEW, gmmIntentUri);
+        mapIntent.setPackage("com.google.android.apps.maps");
+        if (mapIntent.resolveActivity(getPackageManager()) != null) {
+            startActivity(mapIntent);
+        } else {
+            Toast.makeText(mCtx,"There is no google map",Toast.LENGTH_LONG).show();
+        }
+
     }
 
 

+ 1 - 0
ApexDrivers/app/src/main/res/layout/activity_detail.xml

@@ -5,6 +5,7 @@
     xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
+    android:background="#aaaaaa"
     tools:context=".Detail.DetailActivity">
 
     <android.support.v4.widget.SwipeRefreshLayout

+ 1 - 0
ApexDrivers/app/src/main/res/layout/activity_update.xml

@@ -3,6 +3,7 @@
     xmlns:android="http://schemas.android.com/apk/res/android"
     xmlns:app="http://schemas.android.com/apk/res-auto"
     xmlns:tools="http://schemas.android.com/tools"
+    android:background="#aaaaaa"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     tools:context=".Update.UpdateActivity">

+ 1 - 0
ApexDrivers/app/src/main/res/layout/detail_action_cell.xml

@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
               android:orientation="vertical"
+              android:background="#ffffff"
               android:layout_width="match_parent"
               android:layout_height="wrap_content">
 

+ 2 - 1
ApexDrivers/app/src/main/res/layout/detail_location_cell.xml

@@ -1,7 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+                android:background="#ffffff"
                 android:layout_width="match_parent"
-                android:layout_height="match_parent">
+                android:layout_height="wrap_content">
 
     <TextView
         android:id="@+id/detail_location_title_tv"

+ 1 - 0
ApexDrivers/app/src/main/res/layout/detail_mult_line_cell.xml

@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+                android:background="#ffffff"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content">
 

+ 1 - 0
ApexDrivers/app/src/main/res/layout/detail_single_line_cell.xml

@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+                android:background="#ffffff"
                 android:layout_width="match_parent"
                 android:layout_height="wrap_content">
 

+ 1 - 0
ApexDrivers/app/src/main/res/layout/update_label_cell.xml

@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+                android:background="#ffffff"
                 android:layout_width="match_parent"
                 android:layout_height="55dp">
 

+ 1 - 0
ApexDrivers/app/src/main/res/layout/update_multinput_cell.xml

@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+                android:background="#ffffff"
                 android:layout_width="match_parent"
                 android:layout_height="135dp">
 

+ 1 - 0
ApexDrivers/app/src/main/res/layout/update_photo_cell.xml

@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
+    android:background="#ffffff"
     android:layout_width="match_parent"
     android:layout_height="130dp">
 

+ 1 - 0
ApexDrivers/app/src/main/res/layout/update_scanner_input_cell.xml

@@ -1,6 +1,7 @@
 <?xml version="1.0" encoding="utf-8"?>
 <RelativeLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
+    android:background="#ffffff"
     android:layout_width="match_parent"
     android:layout_height="wrap_content">