Browse Source

2024-05-30 修改

修改

1. 部分页面修改
zhaiy 1 year ago
parent
commit
0eb5a1e4d3

+ 1 - 1
app/src/main/java/com/pan_american/android/data/model/daily_payment/entity/DailyPaymentCardListItem.kt

@@ -1,6 +1,6 @@
 package com.pan_american.android.data.model.daily_payment.entity
 
-class DailyPaymentCardListItem() {
+class DailyPaymentCardListItem {
     var id = 0
     var companyId = -1
     var companyName = ""

+ 2 - 0
app/src/main/java/com/pan_american/android/ui/workspace/WorkspaceActivity.kt

@@ -1,6 +1,7 @@
 package com.pan_american.android.ui.workspace
 
 import android.Manifest.permission.POST_NOTIFICATIONS
+import android.annotation.SuppressLint
 import android.app.NotificationChannel
 import android.app.NotificationManager
 import android.app.PendingIntent
@@ -436,6 +437,7 @@ class WorkspaceActivity : BaseActivity<ActivityWorkspaceBinding>() {
         return powerManager.isIgnoringBatteryOptimizations(packageName)
     }
 
+    @SuppressLint("BatteryLife")
     private fun showIgnoreBatteryDialog() {
         if (!isIgnoringBatteryOptimizations()) {
 

+ 4 - 4
app/src/main/res/layout/activity_exchange_tool.xml

@@ -18,7 +18,7 @@
         android:background="@color/white"
         android:orientation="vertical">
 
-        <RelativeLayout
+        <LinearLayout
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_marginStart="@dimen/common_padding_large"
@@ -35,9 +35,9 @@
 
             <TextView
                 android:id="@+id/exchange_input"
-                android:layout_width="wrap_content"
+                android:layout_width="0dp"
                 android:layout_height="wrap_content"
-                android:layout_alignParentEnd="true"
+                android:layout_weight="1"
                 android:background="@color/white"
                 android:gravity="end"
                 android:hint="@string/please_input"
@@ -47,7 +47,7 @@
                 android:textSize="@dimen/text_size_large"
                 android:textStyle="bold" />
 
-        </RelativeLayout>
+        </LinearLayout>
 
         <View
             android:layout_width="match_parent"

+ 26 - 26
app/src/main/res/layout/item_airplane_three_code_list.xml

@@ -27,7 +27,6 @@
                 android:layout_height="wrap_content"
                 android:layout_marginEnd="@dimen/common_padding"
                 android:layout_toStartOf="@id/delete"
-                android:text="沙姆沙伊赫湾国际机场"
                 android:textColor="@color/text_color_blue"
                 android:textSize="@dimen/text_size_medium"
                 android:textStyle="bold" />
@@ -38,7 +37,8 @@
                 android:layout_height="@dimen/common_padding_heavy"
                 android:layout_alignParentEnd="true"
                 android:layout_marginEnd="@dimen/common_padding"
-                android:src="@mipmap/icon_delete" />
+                android:src="@mipmap/icon_delete"
+                tools:ignore="ContentDescription" />
 
         </RelativeLayout>
 
@@ -49,7 +49,7 @@
             android:layout_marginBottom="@dimen/common_padding"
             android:background="@color/line_color" />
 
-        <RelativeLayout
+        <LinearLayout
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_marginTop="@dimen/common_padding"
@@ -59,21 +59,21 @@
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_gravity="center"
-                android:text="国家"
+                android:text="@string/country"
                 android:textSize="@dimen/text_size_medium" />
 
             <TextView
                 android:id="@+id/airplane_country"
-                android:layout_width="wrap_content"
+                android:layout_width="0dp"
                 android:layout_height="wrap_content"
-                android:layout_alignParentEnd="true"
+                android:layout_marginStart="@dimen/common_padding"
+                android:layout_weight="1"
                 android:background="@color/white"
                 android:gravity="end"
                 android:singleLine="true"
-                android:text="埃及"
                 android:textSize="@dimen/text_size_medium" />
 
-        </RelativeLayout>
+        </LinearLayout>
 
         <View
             android:layout_width="match_parent"
@@ -82,7 +82,7 @@
             android:layout_marginBottom="@dimen/common_padding"
             android:background="@color/line_color" />
 
-        <RelativeLayout
+        <LinearLayout
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_marginTop="@dimen/common_padding"
@@ -92,21 +92,21 @@
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_gravity="center"
-                android:text="城市"
+                android:text="@string/city"
                 android:textSize="@dimen/text_size_medium" />
 
             <TextView
                 android:id="@+id/airplane_city"
-                android:layout_width="wrap_content"
+                android:layout_width="0dp"
                 android:layout_height="wrap_content"
-                android:layout_alignParentEnd="true"
+                android:layout_marginStart="@dimen/common_padding"
+                android:layout_weight="1"
                 android:background="@color/white"
                 android:gravity="end"
                 android:singleLine="true"
-                android:text="沙姆沙伊赫湾"
                 android:textSize="@dimen/text_size_medium" />
 
-        </RelativeLayout>
+        </LinearLayout>
 
         <View
             android:layout_width="match_parent"
@@ -115,7 +115,7 @@
             android:layout_marginBottom="@dimen/common_padding"
             android:background="@color/line_color" />
 
-        <RelativeLayout
+        <LinearLayout
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_marginTop="@dimen/common_padding"
@@ -125,21 +125,21 @@
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_gravity="center"
-                android:text="三字码"
+                android:text="@string/three_code"
                 android:textSize="@dimen/text_size_medium" />
 
             <TextView
                 android:id="@+id/airplane_three_code"
-                android:layout_width="wrap_content"
+                android:layout_width="0dp"
                 android:layout_height="wrap_content"
-                android:layout_alignParentEnd="true"
+                android:layout_marginStart="@dimen/common_padding"
+                android:layout_weight="1"
                 android:background="@color/white"
                 android:gravity="end"
                 android:singleLine="true"
-                android:text="SSH"
                 android:textSize="@dimen/text_size_medium" />
 
-        </RelativeLayout>
+        </LinearLayout>
 
         <View
             android:layout_width="match_parent"
@@ -148,7 +148,7 @@
             android:layout_marginBottom="@dimen/common_padding"
             android:background="@color/line_color" />
 
-        <RelativeLayout
+        <LinearLayout
             android:layout_width="match_parent"
             android:layout_height="wrap_content"
             android:layout_marginTop="@dimen/common_padding"
@@ -159,21 +159,21 @@
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
                 android:layout_gravity="center"
-                android:text="创建时间"
+                android:text="@string/create_time"
                 android:textSize="@dimen/text_size_medium" />
 
             <TextView
                 android:id="@+id/create_time"
-                android:layout_width="wrap_content"
+                android:layout_width="0dp"
                 android:layout_height="wrap_content"
-                android:layout_alignParentEnd="true"
+                android:layout_marginStart="@dimen/common_padding"
+                android:layout_weight="1"
                 android:background="@color/white"
                 android:gravity="end"
                 android:singleLine="true"
-                android:text="2023/07/18  17:03:55"
                 android:textSize="@dimen/text_size_medium" />
 
-        </RelativeLayout>
+        </LinearLayout>
 
     </LinearLayout>
 

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

@@ -39,7 +39,8 @@
             android:layout_height="@dimen/common_padding_huge"
             android:layout_gravity="center"
             android:layout_marginStart="@dimen/common_padding"
-            android:src="@mipmap/icon_delete" />
+            android:src="@mipmap/icon_delete"
+            tools:ignore="ContentDescription"/>
 
     </LinearLayout>
 

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

@@ -12,7 +12,8 @@
         android:layout_width="@dimen/common_padding_heavy"
         android:layout_height="@dimen/common_padding_heavy"
         android:layout_marginStart="@dimen/common_padding"
-        android:src="@mipmap/icon_department" />
+        android:src="@mipmap/icon_department"
+        tools:ignore="ContentDescription"/>
 
     <LinearLayout
         android:layout_width="match_parent"

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

@@ -38,7 +38,8 @@
                 android:layout_width="@dimen/common_padding_heavy"
                 android:layout_height="@dimen/common_padding_heavy"
                 android:layout_marginEnd="@dimen/common_padding"
-                android:src="@mipmap/icon_delete" />
+                android:src="@mipmap/icon_delete"
+                tools:ignore="ContentDescription"/>
 
         </LinearLayout>
 

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

@@ -36,7 +36,8 @@
                 android:layout_width="@dimen/common_padding_heavy"
                 android:layout_height="@dimen/common_padding_heavy"
                 android:layout_marginEnd="@dimen/common_padding"
-                android:src="@mipmap/icon_delete" />
+                android:src="@mipmap/icon_delete"
+                tools:ignore="ContentDescription" />
 
         </LinearLayout>
 

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

@@ -38,7 +38,8 @@
                 android:layout_width="@dimen/common_padding_heavy"
                 android:layout_height="@dimen/common_padding_heavy"
                 android:layout_marginEnd="@dimen/common_padding"
-                android:src="@mipmap/icon_delete" />
+                android:src="@mipmap/icon_delete"
+                tools:ignore="ContentDescription" />
 
         </LinearLayout>
 

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

@@ -38,7 +38,8 @@
                 android:layout_width="@dimen/common_padding_heavy"
                 android:layout_height="@dimen/common_padding_heavy"
                 android:layout_marginEnd="@dimen/common_padding"
-                android:src="@mipmap/icon_delete" />
+                android:src="@mipmap/icon_delete"
+                tools:ignore="ContentDescription" />
 
         </LinearLayout>
 

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

@@ -12,7 +12,8 @@
         android:layout_height="30dp"
         android:layout_gravity="center"
         android:layout_marginStart="@dimen/common_padding"
-        android:src="@mipmap/icon_member" />
+        android:src="@mipmap/icon_member"
+        tools:ignore="ContentDescription" />
 
     <LinearLayout
         android:layout_width="match_parent"

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

@@ -36,7 +36,8 @@
                 android:layout_height="@dimen/common_padding_heavy"
                 android:layout_alignParentEnd="true"
                 android:layout_marginEnd="@dimen/common_padding"
-                android:src="@mipmap/icon_delete" />
+                android:src="@mipmap/icon_delete"
+                tools:ignore="ContentDescription" />
 
         </RelativeLayout>
 

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

@@ -38,7 +38,8 @@
                 android:layout_width="@dimen/common_padding_heavy"
                 android:layout_height="@dimen/common_padding_heavy"
                 android:layout_marginEnd="@dimen/common_padding"
-                android:src="@mipmap/icon_delete" />
+                android:src="@mipmap/icon_delete"
+                tools:ignore="ContentDescription" />
 
         </LinearLayout>
 

+ 3 - 1
app/src/main/res/layout/layout_numerical_input.xml

@@ -1,5 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:gravity="bottom"
@@ -57,7 +58,8 @@
             <ImageView
                 android:layout_width="wrap_content"
                 android:layout_height="wrap_content"
-                android:src="@mipmap/icon_backspace" />
+                android:src="@mipmap/icon_backspace"
+                tools:ignore="ContentDescription" />
         </LinearLayout>
     </LinearLayout>
 

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

@@ -21,7 +21,8 @@
             android:layout_gravity="center"
             android:layout_marginStart="30dp"
             android:layout_marginTop="@dimen/common_padding_small"
-            android:src="@mipmap/icon_member" />
+            android:src="@mipmap/icon_member"
+            tools:ignore="ContentDescription" />
 
         <LinearLayout
             android:layout_width="match_parent"