Browse Source

2024-05-20 修改

修改

1. 车公司资料详细界面修改,适配小屏幕
2. 导游资料详情界面修改,适配小屏幕
3. 适配华为鸿蒙系统,版本 4.0 修改部分逻辑代码
zhaiy 10 months ago
parent
commit
8e360faef9

+ 2 - 2
app/build.gradle

@@ -15,8 +15,8 @@ android {
         applicationId "com.pan_american.android"
         minSdk 24
         targetSdk 33
-        versionCode 2
-        versionName "1.0.1"
+        versionCode 3
+        versionName "1.0.2"
 
         testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
     }

+ 1 - 1
app/src/main/java/com/pan_american/android/ui/resource_management/airplane_three_code/AddAirplaneThreeCodeActivity.kt

@@ -56,7 +56,7 @@ class AddAirplaneThreeCodeActivity : BaseActivity<ActivityAddAirplaneThreeCodeBi
         if (fromList) {
 
             airplaneThreeCode =
-                intent.getSerializableExtra("airplaneResource", AirplaneThreeCode::class.java) as AirplaneThreeCode
+                intent.getSerializableExtra("airplaneResource") as AirplaneThreeCode
             initAirplaneResourceInfo()
 
             binding.commit.setText(resources.getString(R.string.update))

+ 1 - 3
app/src/main/java/com/pan_american/android/ui/resource_management/car_resource/AddCarResourceActivity.kt

@@ -1,8 +1,6 @@
 package com.pan_american.android.ui.resource_management.car_resource
 
 import android.os.Bundle
-import android.text.InputType
-import android.view.View
 import android.widget.RadioButton
 import android.widget.TextView
 import androidx.core.content.res.ResourcesCompat
@@ -63,7 +61,7 @@ class AddCarResourceActivity : BaseActivity<ActivityAddCarResourceBinding>() {
 
         if (fromList) {
 
-            carResource = intent.getSerializableExtra("carResource", CarResource::class.java) as CarResource
+            carResource = intent.getSerializableExtra("carResource") as CarResource
 
             initCarResourceInfo()
 

+ 1 - 2
app/src/main/java/com/pan_american/android/ui/resource_management/guide_resource/AddGuideResourceActivity.kt

@@ -1,7 +1,6 @@
 package com.pan_american.android.ui.resource_management.guide_resource
 
 import android.os.Bundle
-import android.text.InputType
 import android.widget.RadioButton
 import android.widget.TextView
 import androidx.core.content.res.ResourcesCompat
@@ -65,7 +64,7 @@ class AddGuideResourceActivity : BaseActivity<ActivityAddGuideResourceBinding>()
 
         if (fromList) {
 
-            guideResource = intent.getSerializableExtra("guideResource", GuideResource::class.java) as GuideResource
+            guideResource = intent.getSerializableExtra("guideResource") as GuideResource
 
             initGuideResourceDetail()
 

+ 18 - 9
app/src/main/res/layout/activity_add_car_resource.xml

@@ -440,10 +440,11 @@
                 android:orientation="horizontal">
 
                 <TextView
-                    android:layout_width="wrap_content"
+                    android:layout_width="0dp"
                     android:layout_height="wrap_content"
                     android:layout_gravity="center"
                     android:text="@string/car_qualification"
+                    android:layout_weight="1"
                     android:textSize="@dimen/text_size_medium" />
 
                 <RadioGroup
@@ -502,9 +503,10 @@
                 android:orientation="horizontal">
 
                 <TextView
-                    android:layout_width="wrap_content"
+                    android:layout_width="0dp"
                     android:layout_height="wrap_content"
                     android:layout_gravity="center"
+                    android:layout_weight="1"
                     android:text="@string/car_age_score"
                     android:textSize="@dimen/text_size_medium" />
 
@@ -563,8 +565,9 @@
                 android:orientation="horizontal">
 
                 <TextView
-                    android:layout_width="wrap_content"
+                    android:layout_width="0dp"
                     android:layout_height="wrap_content"
+                    android:layout_weight="1"
                     android:layout_gravity="center"
                     android:text="@string/car_body_clean"
                     android:textSize="@dimen/text_size_medium" />
@@ -624,9 +627,10 @@
                 android:orientation="horizontal">
 
                 <TextView
-                    android:layout_width="wrap_content"
+                    android:layout_width="0dp"
                     android:layout_height="wrap_content"
                     android:layout_gravity="center"
+                    android:layout_weight="1"
                     android:text="@string/car_inner_clean"
                     android:textSize="@dimen/text_size_medium" />
 
@@ -685,9 +689,10 @@
                 android:orientation="horizontal">
 
                 <TextView
-                    android:layout_width="wrap_content"
+                    android:layout_width="0dp"
                     android:layout_height="wrap_content"
                     android:layout_gravity="center"
+                    android:layout_weight="1"
                     android:text="@string/prepare_score"
                     android:textSize="@dimen/text_size_medium" />
 
@@ -746,9 +751,10 @@
                 android:orientation="horizontal">
 
                 <TextView
-                    android:layout_width="wrap_content"
+                    android:layout_width="0dp"
                     android:layout_height="wrap_content"
                     android:layout_gravity="center"
+                    android:layout_weight="1"
                     android:text="@string/car_configuration"
                     android:textSize="@dimen/text_size_medium" />
 
@@ -807,10 +813,11 @@
                 android:orientation="horizontal">
 
                 <TextView
-                    android:layout_width="wrap_content"
+                    android:layout_width="0dp"
                     android:layout_height="wrap_content"
                     android:layout_gravity="center"
                     android:text="@string/time_concept_score"
+                    android:layout_weight="1"
                     android:textSize="@dimen/text_size_medium" />
 
                 <RadioGroup
@@ -868,9 +875,10 @@
                 android:orientation="horizontal">
 
                 <TextView
-                    android:layout_width="wrap_content"
+                    android:layout_width="0dp"
                     android:layout_height="wrap_content"
                     android:layout_gravity="center"
+                    android:layout_weight="1"
                     android:text="@string/safety_awareness"
                     android:textSize="@dimen/text_size_medium" />
 
@@ -930,9 +938,10 @@
 
                 <TextView
                     android:id="@+id/driver_title"
-                    android:layout_width="wrap_content"
+                    android:layout_width="0dp"
                     android:layout_height="wrap_content"
                     android:layout_gravity="center"
+                    android:layout_weight="1"
                     android:text="@string/driver_age_score"
                     android:textSize="@dimen/text_size_medium" />
 

+ 14 - 7
app/src/main/res/layout/activity_add_guide_resource.xml

@@ -401,9 +401,10 @@
                 android:orientation="horizontal">
 
                 <TextView
-                    android:layout_width="wrap_content"
+                    android:layout_width="0dp"
                     android:layout_height="wrap_content"
                     android:layout_gravity="center"
+                    android:layout_weight="1"
                     android:text="@string/dress_score"
                     android:textSize="@dimen/text_size_medium" />
 
@@ -461,9 +462,10 @@
                 android:orientation="horizontal">
 
                 <TextView
-                    android:layout_width="wrap_content"
+                    android:layout_width="0dp"
                     android:layout_height="wrap_content"
                     android:layout_gravity="center"
+                    android:layout_weight="1"
                     android:text="@string/service_awareness"
                     android:textSize="@dimen/text_size_medium" />
 
@@ -521,9 +523,10 @@
                 android:orientation="horizontal">
 
                 <TextView
-                    android:layout_width="wrap_content"
+                    android:layout_width="0dp"
                     android:layout_height="wrap_content"
                     android:layout_gravity="center"
+                    android:layout_weight="1"
                     android:text="@string/professionalism_score"
                     android:textSize="@dimen/text_size_medium" />
 
@@ -581,9 +584,10 @@
                 android:orientation="horizontal">
 
                 <TextView
-                    android:layout_width="wrap_content"
+                    android:layout_width="0dp"
                     android:layout_height="wrap_content"
                     android:layout_gravity="center"
+                    android:layout_weight="1"
                     android:text="@string/time_concept_score"
                     android:textSize="@dimen/text_size_medium" />
 
@@ -641,9 +645,10 @@
                 android:orientation="horizontal">
 
                 <TextView
-                    android:layout_width="wrap_content"
+                    android:layout_width="0dp"
                     android:layout_height="wrap_content"
                     android:layout_gravity="center"
+                    android:layout_weight="1"
                     android:text="@string/cooperation_score"
                     android:textSize="@dimen/text_size_medium" />
 
@@ -701,9 +706,10 @@
                 android:orientation="horizontal">
 
                 <TextView
-                    android:layout_width="wrap_content"
+                    android:layout_width="0dp"
                     android:layout_height="wrap_content"
                     android:layout_gravity="center"
+                    android:layout_weight="1"
                     android:text="@string/adaptability"
                     android:textSize="@dimen/text_size_medium" />
 
@@ -761,9 +767,10 @@
                 android:orientation="horizontal">
 
                 <TextView
-                    android:layout_width="wrap_content"
+                    android:layout_width="0dp"
                     android:layout_height="wrap_content"
                     android:layout_gravity="center"
+                    android:layout_weight="1"
                     android:text="@string/expressive_ability"
                     android:textSize="@dimen/text_size_medium" />
 

+ 2 - 2
app/src/main/res/values/strings.xml

@@ -390,13 +390,13 @@
     <string name="picture_display">图片展示</string>
     <string name="car_company_score">车公司评分</string>
     <string name="car_qualification">有相关车辆资质</string>
-    <string name="car_age_score">车辆2–4年新,\nVIP及以上需要两年新</string>
+    <string name="car_age_score">车辆2–4年新,VIP及以上需要两年新</string>
     <string name="car_body_clean">车身干净,无文字图片等</string>
     <string name="car_inner_clean">车内整洁,无异味</string>
     <string name="prepare_score">提前备水、纸巾等</string>
     <string name="car_configuration">车辆配置高(皮座椅等)</string>
     <string name="safety_awareness">安全意识</string>
-    <string name="driver_age_score">司机驾龄时间长,\n提前熟悉路线</string>
+    <string name="driver_age_score">司机驾龄时间长,提前熟悉路线</string>
 
     <string name="add_new_car_payment_info">新增车辆费用信息</string>
     <string name="car_use_count">用车数量</string>