Commit 19f0c1d7 authored by 陳煦元's avatar 陳煦元

目前使用的最新版

parent 3c9b71ae
...@@ -10,7 +10,7 @@ android { ...@@ -10,7 +10,7 @@ android {
minSdk 27 minSdk 27
targetSdk 30 targetSdk 30
versionCode 1 versionCode 1
versionName "Dev Ver.1.6.1" versionName "Dev Ver.3.0.0(無車辨)"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
"filters": [], "filters": [],
"attributes": [], "attributes": [],
"versionCode": 1, "versionCode": 1,
"versionName": "Dev Ver.1.6.1", "versionName": "Dev Ver.3.0.0(無車辨)",
"outputFile": "app-release.apk" "outputFile": "app-release.apk"
} }
], ],
......
...@@ -22,8 +22,8 @@ ...@@ -22,8 +22,8 @@
<uses-permission android:name="android.permission.VIBRATE" /> <uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" /> <!-- android 11 管理所有檔案權限 --> <uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.MANAGE_EXTERNAL_STORAGE" /><!-- android 11 管理所有檔案權限 -->
<application <application
android:allowBackup="true" android:allowBackup="true"
......
...@@ -33,4 +33,14 @@ ...@@ -33,4 +33,14 @@
33 Z 民權路Z 33 Z 民權路Z
34 WA 興達路WA 34 WA 興達路WA
35 WB 友忠路WB 35 WB 友忠路WB
36 U 溫州一街U
37 WC 金山路WC
38 WD 世賢路WD
39 WE 湖美一路WE
40 WH 湖美八路WH
41 WG 順興二路WG
42 WG 興美二路WG
43 WH 順興七街WH
44 WH 環湖二街WH
45 WJ 環湖路WJ
This diff is collapsed.
...@@ -52,7 +52,6 @@ public class Common { ...@@ -52,7 +52,6 @@ public class Common {
public static final String PREF_AUTO_DEDUCTION = "PREF_AUTO_DEDUCTION_switch"; public static final String PREF_AUTO_DEDUCTION = "PREF_AUTO_DEDUCTION_switch";
public static final String PREF_MARKIDENTIFY = "PREF_MARKIDENTIFY_switch";//車牌辨識 public static final String PREF_MARKIDENTIFY = "PREF_MARKIDENTIFY_switch";//車牌辨識
public static final String PREF_GPS_SEARCH_RANGE = "PREF_GPS_SEARCH_RANGE"; public static final String PREF_GPS_SEARCH_RANGE = "PREF_GPS_SEARCH_RANGE";
......
...@@ -53,9 +53,9 @@ public class SelectSpaceAdapter extends ListAdapter<Space, SelectSpaceAdapter.Se ...@@ -53,9 +53,9 @@ public class SelectSpaceAdapter extends ListAdapter<Space, SelectSpaceAdapter.Se
this.dataBinding = dataBinding; this.dataBinding = dataBinding;
} }
void setBinding(Space space, OnItemClickListener onItemClickListener){ void setBinding(Space space, OnItemClickListener onItemClickListener){
if (space.isNearSpace){ /* if (space.isNearSpace){
dataBinding.btnSelectSpace.setTextColor(Color.RED); dataBinding.btnSelectSpace.setTextColor(Color.RED);
} }*/
dataBinding.btnSelectSpace.setText(space.id); dataBinding.btnSelectSpace.setText(space.id);
dataBinding.btnSelectSpace.setOnClickListener(view -> { dataBinding.btnSelectSpace.setOnClickListener(view -> {
onItemClickListener.onSpaceClick(space); onItemClickListener.onSpaceClick(space);
......
...@@ -177,7 +177,7 @@ public class Case { ...@@ -177,7 +177,7 @@ public class Case {
/** /**
* 交換用檔案,串連各項資訊獲得 * 交換用檔案,串連各項資訊獲得
* @return 交換用檔案字串 A999;99B17V00189;20220817;10:43;A 中山路A;A216 2 1 中山路A;01 自小客;8052-LZ; ; ;0.5;25;Lat:24.1434911 Lon:120.7285887;1;1; * @return 交換用檔案字串 A999;99B17V00189;20220817;10:43;A 中山路A;A216 2 1 中山路A;01 自小客;8052-LZ;00;00;0.5;25;Lat:24.1434911 Lon:120.7285887;1;1;
*/ */
public String getDetailString() { public String getDetailString() {
DateFormat terminateDateFormat = new SimpleDateFormat("yyyyMMdd"); DateFormat terminateDateFormat = new SimpleDateFormat("yyyyMMdd");
...@@ -185,7 +185,16 @@ public class Case { ...@@ -185,7 +185,16 @@ public class Case {
DateFormat caseTimeFormat = new SimpleDateFormat("HH:mm"); DateFormat caseTimeFormat = new SimpleDateFormat("HH:mm");
String caseTimeString = caseTimeFormat.format(caseTime); // 10:43 String caseTimeString = caseTimeFormat.format(caseTime); // 10:43
String color = String.valueOf(vehicleColor.id);
if(color.length()==1)
{
color="0"+color;
}
String Brand = String.valueOf(vehicleBrand.id);
if(Brand.length()==1)
{
Brand="0"+Brand;
}
// 2022/7/29 加入GPS座標功能後,修改該處假資料 // 2022/7/29 加入GPS座標功能後,修改該處假資料
String locationString = String.format("Lat:%f Lon:%f", location == null ? 0.0 : location.getLatitude(), location == null ? 0.0 : location.getLongitude()); // Lat:24.1434911 Lon:120.7285887 String locationString = String.format("Lat:%f Lon:%f", location == null ? 0.0 : location.getLatitude(), location == null ? 0.0 : location.getLongitude()); // Lat:24.1434911 Lon:120.7285887
...@@ -200,8 +209,8 @@ public class Case { ...@@ -200,8 +209,8 @@ public class Case {
space.getCombineInfo(), space.getCombineInfo(),
vehicleType.getCombineInfo(), vehicleType.getCombineInfo(),
plateNumber, plateNumber,
" ",// Car Color color,//vehicleColor.id,// Car Color
" ",// Car Brand Brand,//vehicleBrand.id,// Car Brand
periodHour, periodHour,
finalExpenses, finalExpenses,
locationString, locationString,
...@@ -313,9 +322,9 @@ public class Case { ...@@ -313,9 +322,9 @@ public class Case {
return this.finalExpenses; return this.finalExpenses;
} }
public int getspacefee() { //最終金額 public int getspacefee() {
return this.space_fee; return this.space_fee;
//return this.finalExpenses;
} }
......
...@@ -25,7 +25,7 @@ public class PreferenceSettings { ...@@ -25,7 +25,7 @@ public class PreferenceSettings {
public boolean pref_printAndCamera = false; // 列印後拍照 public boolean pref_printAndCamera = false; // 列印後拍照
public boolean pref_keyboardrev = false; // 數字鍵順序反轉 public boolean pref_keyboardrev = false; // 數字鍵順序反轉
public boolean pref_autoDeduction = true; // 檢查自動扣款 public boolean pref_autoDeduction = true; // 檢查自動扣款
public boolean pref_markidentify = true; // 車牌辨識 public boolean pref_markidentify = false; // 車牌辨識
public String sdcardpath = ""; public String sdcardpath = "";
public PreferenceSettings(){} public PreferenceSettings(){}
......
...@@ -17,6 +17,7 @@ import androidx.appcompat.app.AppCompatActivity; ...@@ -17,6 +17,7 @@ import androidx.appcompat.app.AppCompatActivity;
import androidx.databinding.DataBindingUtil; import androidx.databinding.DataBindingUtil;
import androidx.lifecycle.ViewModelProvider; import androidx.lifecycle.ViewModelProvider;
import androidx.recyclerview.widget.GridLayoutManager; import androidx.recyclerview.widget.GridLayoutManager;
import androidx.recyclerview.widget.LinearLayoutManager;
import java.io.File; import java.io.File;
import java.util.Collections; import java.util.Collections;
...@@ -25,10 +26,12 @@ import java.util.List; ...@@ -25,10 +26,12 @@ import java.util.List;
import ecom.android.newparkapp.HorizontalLayoutManager; import ecom.android.newparkapp.HorizontalLayoutManager;
import ecom.android.newparkapp.R; import ecom.android.newparkapp.R;
import ecom.android.newparkapp.adapter.CaseListAdapter;
import ecom.android.newparkapp.adapter.SelectSpaceAdapter; import ecom.android.newparkapp.adapter.SelectSpaceAdapter;
import ecom.android.newparkapp.databinding.ActivityT02PlateAndSpaceConfirmBinding; import ecom.android.newparkapp.databinding.ActivityT02PlateAndSpaceConfirmBinding;
import ecom.android.newparkapp.entity.BoxInfo; import ecom.android.newparkapp.entity.BoxInfo;
import ecom.android.newparkapp.entity.Case; import ecom.android.newparkapp.entity.Case;
import ecom.android.newparkapp.entity.CaseAndAllCasePhoto;
import ecom.android.newparkapp.entity.Road; import ecom.android.newparkapp.entity.Road;
import ecom.android.newparkapp.entity.Shift; import ecom.android.newparkapp.entity.Shift;
import ecom.android.newparkapp.entity.Space; import ecom.android.newparkapp.entity.Space;
...@@ -58,6 +61,9 @@ public class T02PlateAndSpaceConfirmActivity extends AppCompatActivity { ...@@ -58,6 +61,9 @@ public class T02PlateAndSpaceConfirmActivity extends AppCompatActivity {
private ViewModelProvider viewModelProvider; private ViewModelProvider viewModelProvider;
private GridLayoutManager rvSpaceOptionGridLayoutManager; private GridLayoutManager rvSpaceOptionGridLayoutManager;
private List<CaseAndAllCasePhoto> caseAndAllCasePhotos,caseAndplateNumberCasePhotos;
private CaseListAdapter caseListAdapter;
@Override @Override
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
...@@ -97,9 +103,12 @@ public class T02PlateAndSpaceConfirmActivity extends AppCompatActivity { ...@@ -97,9 +103,12 @@ public class T02PlateAndSpaceConfirmActivity extends AppCompatActivity {
dataBinding.rvSpaceOption.setAdapter(selectSpaceAdapter); dataBinding.rvSpaceOption.setAdapter(selectSpaceAdapter);
reNewCandidateSpaceAdapter = new SelectSpaceAdapter(space -> nextStage(space)); reNewCandidateSpaceAdapter = new SelectSpaceAdapter(space -> nextStage(space));
dataBinding.rvRenewSpaceOption.setLayoutManager(new GridLayoutManager(this, 2)); dataBinding.rvRenewSpaceOption.setLayoutManager(new GridLayoutManager(this, 2));//
dataBinding.rvRenewSpaceOption.setAdapter(reNewCandidateSpaceAdapter); dataBinding.rvRenewSpaceOption.setAdapter(reNewCandidateSpaceAdapter);
//
plateImageInit(); plateImageInit();
layoutInit(); layoutInit();
eventBinding(); eventBinding();
...@@ -223,6 +232,7 @@ public class T02PlateAndSpaceConfirmActivity extends AppCompatActivity { ...@@ -223,6 +232,7 @@ public class T02PlateAndSpaceConfirmActivity extends AppCompatActivity {
bundle.putString("PlateNumber", plateNumber); bundle.putString("PlateNumber", plateNumber);
bundle.putParcelable("Space", space); bundle.putParcelable("Space", space);
}else { }else {
//舊單
// sort by time // sort by time
selectedCases.sort((t1, t2) -> t1.caseTime.compareTo(t2.caseTime)); selectedCases.sort((t1, t2) -> t1.caseTime.compareTo(t2.caseTime));
// 大的在前 // 大的在前
......
...@@ -21,6 +21,7 @@ import ecom.android.newparkapp.adapter.CaseListAdapter; ...@@ -21,6 +21,7 @@ import ecom.android.newparkapp.adapter.CaseListAdapter;
import ecom.android.newparkapp.databinding.ActivityT03ListFilesBinding; import ecom.android.newparkapp.databinding.ActivityT03ListFilesBinding;
import ecom.android.newparkapp.entity.Case; import ecom.android.newparkapp.entity.Case;
import ecom.android.newparkapp.entity.CaseAndAllCasePhoto; import ecom.android.newparkapp.entity.CaseAndAllCasePhoto;
import ecom.android.newparkapp.entity.CaseStatus;
import ecom.android.newparkapp.entity.Shift; import ecom.android.newparkapp.entity.Shift;
import ecom.android.newparkapp.entity.Space; import ecom.android.newparkapp.entity.Space;
import ecom.android.newparkapp.repository.InfoRepository; import ecom.android.newparkapp.repository.InfoRepository;
...@@ -48,8 +49,8 @@ public class T03ListFilesActivity extends AppCompatActivity { ...@@ -48,8 +49,8 @@ public class T03ListFilesActivity extends AppCompatActivity {
shift = bundle.getParcelable("Shift"); shift = bundle.getParcelable("Shift");
userId = bundle.getInt("UserId"); userId = bundle.getInt("UserId");
dataBinding = DataBindingUtil.setContentView(this, R.layout.activity_t03_list_files); dataBinding = DataBindingUtil.setContentView(this, R.layout.activity_t03_list_files);
dataBinding.pltNo.setOnClickListener(v -> pltclicked());//點擊搜尋車牌按鈕 dataBinding.pltNo.setOnClickListener(v -> pltclicked());//點擊輸入車牌按鈕
dataBinding.search.setOnClickListener(v -> searched());//點擊搜尋車牌按鈕 dataBinding.search.setOnClickListener(v -> searched());//點擊搜尋按鈕
viewModelProvider = new ViewModelProvider(this); viewModelProvider = new ViewModelProvider(this);
t01SettingViewModel = viewModelProvider.get(T01SettingViewModel.class); t01SettingViewModel = viewModelProvider.get(T01SettingViewModel.class);
resultLauncherRegister(); resultLauncherRegister();
...@@ -78,7 +79,7 @@ public class T03ListFilesActivity extends AppCompatActivity { ...@@ -78,7 +79,7 @@ public class T03ListFilesActivity extends AppCompatActivity {
dataBinding.rvCaseList.setLayoutManager(new LinearLayoutManager(this)); dataBinding.rvCaseList.setLayoutManager(new LinearLayoutManager(this));
dataBinding.rvCaseList.setAdapter(caseListAdapter); dataBinding.rvCaseList.setAdapter(caseListAdapter);
} }
private Button plt; private Button plt;//查詢車牌
private void pltclicked() private void pltclicked()
{ {
Intent intent = new Intent(); Intent intent = new Intent();
...@@ -127,6 +128,7 @@ public class T03ListFilesActivity extends AppCompatActivity { ...@@ -127,6 +128,7 @@ public class T03ListFilesActivity extends AppCompatActivity {
caseListAdapter.submitList(caseAndplateNumberCasePhotos); caseListAdapter.submitList(caseAndplateNumberCasePhotos);
dataBinding.rvCaseList.setLayoutManager(new LinearLayoutManager(this)); dataBinding.rvCaseList.setLayoutManager(new LinearLayoutManager(this));
dataBinding.rvCaseList.setAdapter(caseListAdapter); dataBinding.rvCaseList.setAdapter(caseListAdapter);
} }
} }
\ No newline at end of file
...@@ -16,6 +16,8 @@ import android.content.Intent; ...@@ -16,6 +16,8 @@ import android.content.Intent;
import android.content.IntentFilter; import android.content.IntentFilter;
import android.content.pm.PackageManager; import android.content.pm.PackageManager;
import android.os.Build; import android.os.Build;
import android.text.TextUtils;
import android.util.Log;
import android.widget.ArrayAdapter; import android.widget.ArrayAdapter;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
...@@ -378,6 +380,27 @@ public class BlueToothPortViewModel extends AndroidViewModel { ...@@ -378,6 +380,27 @@ public class BlueToothPortViewModel extends AndroidViewModel {
return; return;
} }
String powerPercentFull = printer.getPowerPercentFull(); String powerPercentFull = printer.getPowerPercentFull();
if (TextUtils.isEmpty(powerPercentFull)) {
return;
}
// Remove quotes and percentage signs
String purePowerPercentFull = powerPercentFull.replaceAll("[\"%]","");
// Log the cleaned string for debugging
Log.d("PowerPercentFull", "Cleaned String: " + purePowerPercentFull);
if (purePowerPercentFull.trim().isEmpty()){
return;
}
try {
float purePowerPercentFullFloat = Float.parseFloat(purePowerPercentFull);
printerPowerPercentFull.postValue(purePowerPercentFullFloat);
} catch (NumberFormatException e) {
// Handle the case where conversion fails
Log.e("NumberFormatException", "Error parsing float: " + e.getMessage());
}
/*if (!blueToothStatusMutableLiveData.getValue().equals(BlueToothViewModel.BlueToothStatus.CONNECT_SUCCESS)){
return;
}
String powerPercentFull = printer.getPowerPercentFull();
if (powerPercentFull != null){ if (powerPercentFull != null){
//String purePowerPercentFull = powerPercentFull.substring(1, powerPercentFull.length() - 2); //String purePowerPercentFull = powerPercentFull.substring(1, powerPercentFull.length() - 2);
String purePowerPercentFull = powerPercentFull.replaceAll("[\"%]",""); String purePowerPercentFull = powerPercentFull.replaceAll("[\"%]","");
...@@ -386,7 +409,7 @@ public class BlueToothPortViewModel extends AndroidViewModel { ...@@ -386,7 +409,7 @@ public class BlueToothPortViewModel extends AndroidViewModel {
} }
float purePowerPercentFullFloat = Float.parseFloat(purePowerPercentFull); float purePowerPercentFullFloat = Float.parseFloat(purePowerPercentFull);
printerPowerPercentFull.postValue(purePowerPercentFullFloat); printerPowerPercentFull.postValue(purePowerPercentFullFloat);
} }*/
} }
public enum BlueToothStatus{ public enum BlueToothStatus{
......
...@@ -86,13 +86,13 @@ public class T01ImportDbViewModel extends AndroidViewModel { ...@@ -86,13 +86,13 @@ public class T01ImportDbViewModel extends AndroidViewModel {
} }
public void importTable(String tableName) { public void importTable(String tableName) {
String path = dataSavePath + tableName; /* String path = dataSavePath + tableName;
try { try {
copyAssetFileToFiles(getApplication(), tableName, dataSavePath); copyAssetFileToFiles(getApplication(), tableName, dataSavePath);
} catch (IOException e) { } catch (IOException e) {
e.printStackTrace(); e.printStackTrace();
return; return;
} }*/
updateTable(tableName); updateTable(tableName);
} }
......
...@@ -107,7 +107,7 @@ public class T01SettingViewModel extends AndroidViewModel { ...@@ -107,7 +107,7 @@ public class T01SettingViewModel extends AndroidViewModel {
PREF.pref_autoDeduction = settings.getBoolean(Common.PREF_AUTO_DEDUCTION, true); PREF.pref_autoDeduction = settings.getBoolean(Common.PREF_AUTO_DEDUCTION, true);
//autoDeduction_switch.setChecked(pref_autoDeduction); //autoDeduction_switch.setChecked(pref_autoDeduction);
PREF.pref_markidentify = settings.getBoolean(Common.PREF_MARKIDENTIFY, true);//車牌辨識 PREF.pref_markidentify = settings.getBoolean(Common.PREF_MARKIDENTIFY, false);//車牌辨識
PREF.pref_GpsSearchRange = settings.getFloat(Common.PREF_GPS_SEARCH_RANGE, 0.0002f); PREF.pref_GpsSearchRange = settings.getFloat(Common.PREF_GPS_SEARCH_RANGE, 0.0002f);
} }
...@@ -191,7 +191,11 @@ public class T01SettingViewModel extends AndroidViewModel { ...@@ -191,7 +191,11 @@ public class T01SettingViewModel extends AndroidViewModel {
return PREF.getValue().pref_GpsSearchRange; return PREF.getValue().pref_GpsSearchRange;
} }
public void setGPSSearchRange(float gpsSearchRange){ tempPREF.pref_GpsSearchRange = gpsSearchRange; } public void setGPSSearchRange(float gpsSearchRange){ tempPREF.pref_GpsSearchRange = gpsSearchRange; }
public boolean getAutoDeduction() {return PREF.getValue().pref_autoDeduction;} public boolean getAutoDeduction() {return true;}
//public boolean getAutoDeduction() {return PREF.getValue().pref_autoDeduction;}
public boolean getmarkidentify(){return PREF.getValue().pref_markidentify;} public boolean getmarkidentify(){return PREF.getValue().pref_markidentify;}
/** /**
......
...@@ -174,7 +174,7 @@ public class T02StartViewModel extends AndroidViewModel { ...@@ -174,7 +174,7 @@ public class T02StartViewModel extends AndroidViewModel {
Space space = tempCase.space; Space space = tempCase.space;
VehicleType vehicleType = tempCase.vehicleType; VehicleType vehicleType = tempCase.vehicleType;
SpaceFee spaceFee = infoRepository.spaceFeeDao.findByName(space.spaceRate.id, vehicleType.id); SpaceFee spaceFee = infoRepository.spaceFeeDao.findByName(space.spaceRate.id, vehicleType.id);
tempCase.space_fee = spaceFee==null ? 20: spaceFee.fee;//如何看值是否為空 tempCase.space_fee = spaceFee==null ? 20: spaceFee.fee;
int addCount = calcPeriodHourCount(tempCase); int addCount = calcPeriodHourCount(tempCase);
int freeAddCount = calcFreePeriodHourCount(tempCase); int freeAddCount = calcFreePeriodHourCount(tempCase);
tempCase.periodHour = addCount * space.spaceRate.perHours; tempCase.periodHour = addCount * space.spaceRate.perHours;
...@@ -378,7 +378,10 @@ public class T02StartViewModel extends AndroidViewModel { ...@@ -378,7 +378,10 @@ public class T02StartViewModel extends AndroidViewModel {
newCase.space = thisCase.space; newCase.space = thisCase.space;
// 更新費用 // 更新費用
getSpaceFee(newCase); getSpaceFee(newCase);
//更新車色
newCase.vehicleColor=thisCase.vehicleColor;
//更新費用
newCase.vehicleBrand=thisCase.vehicleBrand;
// 更新車牌 // 更新車牌
newCase.plateNumber = thisCase.plateNumber; newCase.plateNumber = thisCase.plateNumber;
// 更新自動扣繳 // 更新自動扣繳
...@@ -495,8 +498,13 @@ public class T02StartViewModel extends AndroidViewModel { ...@@ -495,8 +498,13 @@ public class T02StartViewModel extends AndroidViewModel {
Common.updateTXT(getApplication(), tempCase.getDatePath(getApplication().getString(R.string.sysData_path)) + tempCase.getUserDateFileName(), tempCase.billingNumber2, tempCase.getDetailString()); Common.updateTXT(getApplication(), tempCase.getDatePath(getApplication().getString(R.string.sysData_path)) + tempCase.getUserDateFileName(), tempCase.billingNumber2, tempCase.getDetailString());
Common.writeTXT(getApplication(), tempCase.getUploadPath(getApplication().getString(R.string.sysDataUpload_path)), tempCase.getUploadFileName(), tempCase.getDetailString()); Common.writeTXT(getApplication(), tempCase.getUploadPath(getApplication().getString(R.string.sysDataUpload_path)), tempCase.getUploadFileName(), tempCase.getDetailString());
int index = caseCursor.getValue();
if (index >= cases.size()) {
index = cases.size() - 1; // 将索引值设置为列表长度减一
}
cases.set(index, tempCase);
// 更新當前list結果 // 更新當前list結果
cases.set(caseCursor.getValue(), tempCase); //cases.set(caseCursor.getValue(), tempCase);
}); });
break; break;
default: default:
...@@ -636,7 +644,14 @@ public class T02StartViewModel extends AndroidViewModel { ...@@ -636,7 +644,14 @@ public class T02StartViewModel extends AndroidViewModel {
if (tempCase.photoCount == 0){ if (tempCase.photoCount == 0){
return false; return false;
} }
//檢查顏色
if (tempCase.vehicleColor == null){
return false;
}
//檢查廠牌
if (tempCase.vehicleBrand == null){
return false;
}
return true; return true;
} }
......
...@@ -544,7 +544,7 @@ ...@@ -544,7 +544,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1" android:layout_weight="1"
android:text="@string/photograph_button_text" android:text="@string/photographtxt"
android:textColor="@color/red" android:textColor="@color/red"
android:textSize="28sp" /> android:textSize="28sp" />
</LinearLayout> </LinearLayout>
......
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="bottom|center" android:gravity="bottom|center"
android:text="@string/ecom_title" android:text="@string/ecom2024title"
android:textColor="#A3D1D1" android:textColor="#A3D1D1"
android:textSize="15sp" android:textSize="15sp"
app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintBottom_toBottomOf="parent"
......
...@@ -316,15 +316,15 @@ ...@@ -316,15 +316,15 @@
android:textSize="24sp" android:textSize="24sp"
android:checked="@={t01SettingViewModel.PREF.pref_autoNext}"/> android:checked="@={t01SettingViewModel.PREF.pref_autoNext}"/>
<androidx.appcompat.widget.SwitchCompat <!-- <androidx.appcompat.widget.SwitchCompat
android:id="@+id/usualOption_switch" android:id="@+id/usualOption_switch"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="45dp" android:layout_height="45dp"
android:paddingStart="5dp" android:paddingStart="5dp"
android:paddingEnd="0dp" android:paddingEnd="0dp"
android:text="顯示常用選項" android:text="顯示常用選項"
android:textSize="24sp" android:textSize="24sp"
android:checked="@={t01SettingViewModel.PREF.pref_usualOption}"/> android:checked="@={t01SettingViewModel.PREF.pref_usualOption}"/>-->
<androidx.appcompat.widget.SwitchCompat <androidx.appcompat.widget.SwitchCompat
android:id="@+id/nearbyLocation_switch" android:id="@+id/nearbyLocation_switch"
...@@ -337,77 +337,77 @@ ...@@ -337,77 +337,77 @@
android:checked="@={t01SettingViewModel.PREF.pref_nearbyLocation}"/> android:checked="@={t01SettingViewModel.PREF.pref_nearbyLocation}"/>
<androidx.appcompat.widget.SwitchCompat <!-- <androidx.appcompat.widget.SwitchCompat
android:id="@+id/printAndCamera_switch" android:id="@+id/printAndCamera_switch"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="45dp" android:layout_height="45dp"
android:paddingStart="5dp" android:paddingStart="5dp"
android:paddingEnd="0dp" android:paddingEnd="0dp"
android:text="列印後拍照" android:text="列印後拍照"
android:textSize="24sp" android:textSize="24sp"
android:checked="@={t01SettingViewModel.PREF.pref_printAndCamera}"/> android:checked="@={t01SettingViewModel.PREF.pref_printAndCamera}"/>-->
<androidx.appcompat.widget.SwitchCompat <androidx.appcompat.widget.SwitchCompat
android:id="@+id/keyboard_rev_switch" android:id="@+id/keyboard_rev_switch"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="45dp" android:layout_height="45dp"
android:paddingStart="5dp" android:paddingStart="5dp"
android:paddingEnd="0dp" android:paddingEnd="0dp"
android:text="數字鍵順序反轉" android:text="數字鍵順序反轉"
android:textSize="24sp" android:textSize="24sp"
android:checked="@={t01SettingViewModel.PREF.pref_keyboardrev}"/> android:checked="@={t01SettingViewModel.PREF.pref_keyboardrev}"/>
<androidx.appcompat.widget.SwitchCompat <!-- <androidx.appcompat.widget.SwitchCompat
android:id="@+id/autoDeduction_switch" android:id="@+id/autoDeduction_switch"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="45dp" android:layout_height="45dp"
android:paddingStart="5dp" android:paddingStart="5dp"
android:paddingEnd="0dp" android:paddingEnd="0dp"
android:text="檢查自動扣款" android:text="檢查自動扣款"
android:textSize="24sp" android:textSize="24sp"
android:checked="@={t01SettingViewModel.PREF.pref_autoDeduction}"/> android:checked="@={t01SettingViewModel.PREF.pref_autoDeduction}"/>-->
<androidx.appcompat.widget.SwitchCompat <!-- <androidx.appcompat.widget.SwitchCompat
android:id="@+id/markidentify_switch" android:id="@+id/markidentify_switch"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="45dp" android:layout_height="45dp"
android:paddingStart="5dp" android:paddingStart="5dp"
android:paddingEnd="0dp" android:paddingEnd="0dp"
android:text="車牌辨識" android:text="車牌辨識"
android:textSize="24sp" android:textSize="24sp"
android:checked="@={t01SettingViewModel.PREF.pref_markidentify}"/> android:checked="@={t01SettingViewModel.PREF.pref_markidentify}"/> -->
<Button <Button
android:id="@+id/importData_button" android:id="@+id/importData_button"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="right" android:layout_gravity="right"
android:layout_marginTop="5dp" android:layout_marginTop="5dp"
android:gravity="center" android:gravity="center"
android:text="匯入資料" android:text="匯入資料"
android:textSize="25sp" /> android:textSize="25sp" />
<Button <Button
android:id="@+id/btn_dump_db" android:id="@+id/btn_dump_db"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="right" android:layout_gravity="right"
android:layout_marginTop="5dp" android:layout_marginTop="5dp"
android:gravity="center" android:gravity="center"
android:text="資料匯出" android:text="資料匯出"
android:textSize="25sp" /> android:textSize="25sp" />
<Button <Button
android:id="@+id/deletelog_db" android:id="@+id/deletelog_db"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="right" android:layout_gravity="right"
android:layout_marginTop="5dp" android:layout_marginTop="5dp"
android:gravity="center" android:gravity="center"
android:text="清除Log.db資料" android:text="清除Log.db資料"
android:visibility="gone" android:visibility="gone"
android:textSize="25sp" /> android:textSize="25sp" />
<!--隱藏按鈕--> <!--隱藏按鈕-->
<Button <Button
android:id="@+id/advanced_button" android:id="@+id/advanced_button"
......
...@@ -543,7 +543,7 @@ ...@@ -543,7 +543,7 @@
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:layout_weight="1" android:layout_weight="1"
android:text="@string/photograph_button_text" android:text="@string/photographtxt"
android:textColor="@color/red" android:textColor="@color/red"
android:textSize="28sp" /> android:textSize="28sp" />
</LinearLayout> </LinearLayout>
...@@ -561,12 +561,12 @@ ...@@ -561,12 +561,12 @@
android:text="註銷本單" android:text="註銷本單"
android:textColor="@color/red" android:textColor="@color/red"
android:textSize="28sp" /> android:textSize="28sp" />
<Button <!--<Button
android:id="@+id/btn_gps_search_mode" android:id="@+id/btn_gps_search_mode"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="巡場模式" android:text="巡場模式"
android:textSize="28sp" /> android:textSize="28sp" />-->
</LinearLayout> </LinearLayout>
......
...@@ -5,24 +5,32 @@ ...@@ -5,24 +5,32 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="651dp" android:layout_height="match_parent"
android:orientation="vertical" android:orientation="vertical"
tools:context=".view.T03ListFilesActivity"> tools:context=".view.T03ListFilesActivity">
<Button <LinearLayout
android:id="@+id/plt_no"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="輸入車牌" /> android:orientation="horizontal">
<Button
android:id="@+id/search" <Button
android:layout_width="match_parent" android:id="@+id/plt_no"
android:layout_height="wrap_content" android:layout_width="312dp"
android:text="查詢" /> android:layout_height="wrap_content"
android:text="輸入車牌" />
<Button
android:id="@+id/search"
android:layout_width="100dp"
android:layout_height="wrap_content"
android:text="查詢" />
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView <androidx.recyclerview.widget.RecyclerView
android:id="@+id/rv_case_list" android:id="@+id/rv_case_list"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="603dp" android:layout_height="659dp"
tools:listitem="@layout/card_view_list_files_item"> tools:listitem="@layout/card_view_list_files_item">
</androidx.recyclerview.widget.RecyclerView> </androidx.recyclerview.widget.RecyclerView>
......
<layout xmlns:android="http://schemas.android.com/apk/res/android"> <layout xmlns:android="http://schemas.android.com/apk/res/android">
<Button <Button
android:id="@+id/btn_select_road" android:id="@+id/btn_select_road"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:text="C876" android:text="C876"
android:textSize="20dp"> android:textSize="34sp"></Button>
</Button>
</layout> </layout>
\ No newline at end of file
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
<Button <Button
android:id="@+id/btn_select_space" android:id="@+id/btn_select_space"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="81dp"
android:text="C876" android:text="C876"
android:textSize="20dp"></Button> android:textSize="30sp"></Button>
</layout> </layout>
\ No newline at end of file
...@@ -80,4 +80,7 @@ ...@@ -80,4 +80,7 @@
<string name="hello_second_fragment">Hello second fragment. Arg: %1$s</string> <string name="hello_second_fragment">Hello second fragment. Arg: %1$s</string>
<string name="current_user">當前使用者:\n %s</string> <string name="current_user">當前使用者:\n %s</string>
<string name="ecom2024title">2024©版權所有\n昱通資訊事業股份有限公司</string>
<string name="pootograph_new_text2">拍照/新筆</string>
<string name="photographtxt">新筆拍照</string>
</resources> </resources>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment