bug修改

This commit is contained in:
jjLv 2026-01-17 00:11:36 +08:00
parent d9c13a34bd
commit 2f348edb12
9 changed files with 175 additions and 64 deletions

View File

@ -72,6 +72,7 @@ import com.bonus.canteen.db.entity.base.DeviceInfo;
import com.bonus.canteen.entity.CanteenBean; import com.bonus.canteen.entity.CanteenBean;
import com.bonus.canteen.entity.DishBean; import com.bonus.canteen.entity.DishBean;
import com.bonus.canteen.entity.KeepSampleRecordBean; import com.bonus.canteen.entity.KeepSampleRecordBean;
import com.bonus.canteen.entity.KitchenSampleDishesRecord;
import com.bonus.canteen.entity.MealTimeBean; import com.bonus.canteen.entity.MealTimeBean;
import com.bonus.canteen.entity.PhotoResponse; import com.bonus.canteen.entity.PhotoResponse;
import com.bonus.canteen.entity.StallBean; import com.bonus.canteen.entity.StallBean;
@ -79,6 +80,7 @@ import com.bonus.canteen.print.TestFunction;
import com.bonus.canteen.receiver.ShutdownReceiver; import com.bonus.canteen.receiver.ShutdownReceiver;
import com.bonus.canteen.utils.DateTimeHelper; import com.bonus.canteen.utils.DateTimeHelper;
import com.bonus.canteen.utils.OkHttpService; import com.bonus.canteen.utils.OkHttpService;
import com.bonus.canteen.utils.StringHelper;
import com.bonus.canteen.utils.ThreadPoolManager; import com.bonus.canteen.utils.ThreadPoolManager;
import com.bonus.canteen.utils.WorkConfig; import com.bonus.canteen.utils.WorkConfig;
import com.caysn.autoreplyprint.AutoReplyPrint; import com.caysn.autoreplyprint.AutoReplyPrint;
@ -270,6 +272,11 @@ public class MainActivity extends AppCompatActivity {
XToastUtils.info("请先选择留样菜品!"); XToastUtils.info("请先选择留样菜品!");
return; return;
} }
boolean isRecord = !StringHelper.isEmptyAndNull(currentDishBean.getSampleSaveTime());
if (isRecord) {
XToastUtils.info("当前菜品已经留样,不能重复留样!");
return;
}
isUpload = true; isUpload = true;
showTipDialog("正在留样,请稍候..."); showTipDialog("正在留样,请稍候...");
takePicture(); takePicture();
@ -293,9 +300,74 @@ public class MainActivity extends AppCompatActivity {
}); });
findViewById(R.id.refresh).setOnClickListener(view -> { findViewById(R.id.refresh).setOnClickListener(view -> {
isInitData = false; isInitData = false;
currentDishBean = new DishBean();
XToastUtils.info("正在刷新,请稍候..."); XToastUtils.info("正在刷新,请稍候...");
initStallTab(canteenList.get(0).getCanteenId()); initStallTab(canteenList.get(0).getCanteenId());
}); });
findViewById(R.id.manualPrinting).setOnClickListener(view -> {
if(currentDishBean == null || currentDishBean.getDishesId() == null || currentDishBean.getDishesId().isEmpty()) {
XToastUtils.info("请先选择留样菜品!");
return;
}
boolean isRecord = StringHelper.isEmptyAndNull(currentDishBean.getSampleSaveTime());
if (isRecord) {
XToastUtils.info("请先选择已经留样的菜品!");
}
ThreadPoolManager.getExecutor().execute(()->{
//获取当前菜品的留样记录
String url = WorkConfig.getBaseUrl() + "/kitchen_sample_dishes_record/list?pageNum=" + 1 + "&pageSize=" + 10;
Log.e(TAG, "loadMoreData url: " + url);
JSONObject json = new JSONObject();
json.put("searchType", 3);
mealTimeBeanList.stream()
.filter(mealTimeBean -> currentDishBean.getMealtimeType().equals(mealTimeBean.getMealtimeType()))
.filter(mealTimeBean -> DateTimeHelper.isInTimeRange(mealTimeBean.getStartTime(), mealTimeBean.getEndTime()))
.findFirst()
.ifPresent(mealTimeBean -> json.put("mealtimeType", mealTimeBean.getMealtimeType()));
json.put("canteenId", ((CanteenBean) canteenSpinner.getSelectedItem()).getCanteenId());
json.put("stallId", ((StallBean) stallSpinner.getSelectedItem()).getStallId());
json.put("dishesId", currentDishBean.getDishesId());
json.put("startDateTime", DateTimeHelper.getNowDate() + " 00:00:00");
json.put("endDateTime", DateTimeHelper.getNowDate() + " 23:59:59");
String jsonString = json.toString();
Log.e(TAG, "loadMoreData jsonString: " + jsonString);
MediaType mediaType = MediaType.parse(AppConstants.MEDIA_TYPE);
RequestBody body = RequestBody.create(mediaType, jsonString);
Request request = new Request.Builder().url(url).post(body).build();
try {
String result = service.httpPost(url, body, this, request);
Log.e(TAG, "loadMoreData result: " + result);
if (!ObjectUtil.isEmpty(result)) {
JSONObject jsonObject = JSONObject.parseObject(result);
if (jsonObject.containsKey("rows")) {
List<KitchenSampleDishesRecord> moreRecords = new Gson().fromJson(
jsonObject.getString("rows"),
new TypeToken<List<KitchenSampleDishesRecord>>() {
}.getType()
);
String userName = AppDatabase.getDatabase(this).loginInfoDao().getLoginInfoOne().getUserName();
KeepSampleRecordBean keepSampleRecordBean = new KeepSampleRecordBean();
keepSampleRecordBean.setDishName(moreRecords.get(0).getDishesName());
keepSampleRecordBean.setStallName(moreRecords.get(0).getStallName());
keepSampleRecordBean.setMealTimeName(mealTimeBeanList.stream().filter(mealTimeBean ->
mealTimeBean.getMealtimeType().equals(json.get("mealtimeType").toString()))
.map(MealTimeBean::getMealtimeName)
.findFirst()
.orElse("未知时间"));
keepSampleRecordBean.setWeight(String.valueOf(moreRecords.get(0).getSampleWeight()));
keepSampleRecordBean.setSampleHolder(userName);
keepSampleRecordBean.setPrintingTime(DateTimeHelper.getTime());
keepSampleRecordBean.setId(moreRecords.get(0).getDishesId());
keepSampleRecordBean.setValidityPeriod("48");
toPrint(keepSampleRecordBean);
}
}
} catch (Exception e) {
Log.e(TAG, "Error loading more data: " + e.getMessage());
}
});
});
} }
private void initScale() { private void initScale() {
@ -396,15 +468,15 @@ public class MainActivity extends AppCompatActivity {
if (unit.equalsIgnoreCase("kg")) { if (unit.equalsIgnoreCase("kg")) {
decimal = decimal.multiply(new BigDecimal(1000)).setScale(0, RoundingMode.HALF_UP); decimal = decimal.multiply(new BigDecimal(1000)).setScale(0, RoundingMode.HALF_UP);
} }
Log.e("MainActivity", "秤数据解析结果: " + decimal + " " + "g"); // Log.e("MainActivity", "秤数据解析结果: " + decimal + " " + "g");
tvWeight.setText(String.format(Locale.getDefault(), "%s", decimal)); tvWeight.setText(String.format(Locale.getDefault(), "%s", decimal));
if (decimal.compareTo(BigDecimal.valueOf(124)) > 0) { if (decimal.compareTo(BigDecimal.valueOf(124)) > 0) {
// 如果重量大于100表示秤上有物品 // 如果重量大于124表示秤上有物品
keepASample.setEnabled(true); keepASample.setEnabled(true);
keepASample.setBackground(getDrawable(R.drawable.title_bg)); keepASample.setBackground(getDrawable(R.drawable.title_bg));
keepASample.setText(getString(R.string.keepASample)); keepASample.setText(getString(R.string.keepASample));
} else { } else {
// 如果重量小于等于0表示秤上没有物品 // 如果重量小于等于124表示秤上没有物品
keepASample.setEnabled(false); keepASample.setEnabled(false);
keepASample.setBackground(getDrawable(R.drawable.btn_border_bg_10_dark_gray)); keepASample.setBackground(getDrawable(R.drawable.btn_border_bg_10_dark_gray));
keepASample.setText(getString(R.string.theWeightDoesNotMeetTheStandard)); keepASample.setText(getString(R.string.theWeightDoesNotMeetTheStandard));
@ -680,19 +752,32 @@ public class MainActivity extends AppCompatActivity {
keepSampleRecordBean.setValidityPeriod("48"); keepSampleRecordBean.setValidityPeriod("48");
initDishData(stallId); initDishData(stallId);
toPrint(keepSampleRecordBean); toPrint(keepSampleRecordBean);
if (dialog != null && dialog.isShowing()) {
dialog.dismiss(); dialog.dismiss();
}
currentDishBean = new DishBean(); // 清空当前菜品信息 currentDishBean = new DishBean(); // 清空当前菜品信息
ThreadPoolManager.getExecutor().execute(this::readScale); ThreadPoolManager.getExecutor().execute(this::readScale);
}); });
} else { } else {
isUpload = false; isUpload = false;
ThreadPoolManager.getExecutor().execute(this::readScale); ThreadPoolManager.getExecutor().execute(this::readScale);
runOnUiThread(() -> XToastUtils.error("留样失败,请重试!")); runOnUiThread(() -> {
XToastUtils.error("留样失败,请重试!");
if (dialog != null && dialog.isShowing()) {
dialog.dismiss();
}
});
} }
} else { } else {
isUpload = false; isUpload = false;
ThreadPoolManager.getExecutor().execute(this::readScale); ThreadPoolManager.getExecutor().execute(this::readScale);
runOnUiThread(() -> XToastUtils.error("留样失败,请重试!")); runOnUiThread(() -> {
XToastUtils.error("留样失败,请重试!");
if (dialog != null && dialog.isShowing()) {
dialog.dismiss();
}
});
} }
}); });
} }
@ -702,11 +787,16 @@ public class MainActivity extends AppCompatActivity {
* 使用AutoReplyPrint打印留样信息 * 使用AutoReplyPrint打印留样信息
*/ */
private void toPrint(KeepSampleRecordBean keepSampleRecordBean) { private void toPrint(KeepSampleRecordBean keepSampleRecordBean) {
new Thread(() -> { ThreadPoolManager.getExecutor().execute(()->{
try { try {
// 判断端口是否已经打开若已打开则先关闭
if(h != Pointer.NULL && AutoReplyPrint.INSTANCE.CP_Port_IsOpened(h)){
Log.i(TAG,"usb端口已经打开");
AutoReplyPrint.INSTANCE.CP_Port_Close(h);
}
// 打开端口若失败则重试打开
h = AutoReplyPrint.INSTANCE.CP_Port_OpenUsb("VID:0x4B43,PID:0x3538", 1); h = AutoReplyPrint.INSTANCE.CP_Port_OpenUsb("VID:0x4B43,PID:0x3538", 1);
if (h == Pointer.NULL) { if (h == Pointer.NULL) {
// runOnUiThread(() -> XToastUtils.warning("打印机连接失败,尝试重新连接"));
h = AutoReplyPrint.INSTANCE.CP_Port_OpenUsb("VID:0x4B43,PID:0x3538", 1); h = AutoReplyPrint.INSTANCE.CP_Port_OpenUsb("VID:0x4B43,PID:0x3538", 1);
if (h == Pointer.NULL) { if (h == Pointer.NULL) {
Log.e(TAG, "打印机连接失败"); Log.e(TAG, "打印机连接失败");
@ -714,15 +804,18 @@ public class MainActivity extends AppCompatActivity {
return; return;
} }
} }
// 打印留样信息
TestFunction fun = new TestFunction(); TestFunction fun = new TestFunction();
fun.ctx = activity; fun.ctx = activity;
Method m = TestFunction.class.getDeclaredMethod("ToPrint", Pointer.class, KeepSampleRecordBean.class); Method m = TestFunction.class.getDeclaredMethod("ToPrint", Pointer.class, KeepSampleRecordBean.class);
m.setAccessible(true); // 允许访问私有方法 m.setAccessible(true); // 允许访问私有方法
m.invoke(fun, h, keepSampleRecordBean); m.invoke(fun, h, keepSampleRecordBean);
}catch (Exception e){
Log.e(TAG, "打印失败Exception: " + e.getMessage());
} catch(Throwable tr) { } catch(Throwable tr) {
tr.printStackTrace(); Log.e(TAG, "打印失败Throwable: " + tr.getMessage());
} }
}).start(); });
} }
/*---------------------------启动相机及配置等--------------------------------*/ /*---------------------------启动相机及配置等--------------------------------*/
@ -739,10 +832,14 @@ public class MainActivity extends AppCompatActivity {
// 设置自动对焦 // 设置自动对焦
captureBuilder.set(CaptureRequest.CONTROL_AF_MODE, captureBuilder.set(CaptureRequest.CONTROL_AF_MODE,
CaptureRequest.CONTROL_AF_MODE_CONTINUOUS_PICTURE); CaptureRequest.CONTROL_AF_MODE_CONTINUOUS_PICTURE);
// 设置光学防抖
captureBuilder.set(CaptureRequest.LENS_OPTICAL_STABILIZATION_MODE,
CaptureRequest.LENS_OPTICAL_STABILIZATION_MODE_ON);
// 设置 JPEG 质量为最高
captureBuilder.set(CaptureRequest.JPEG_QUALITY, (byte) 100);
// 设置方向 // 设置方向
int rotation = getWindowManager().getDefaultDisplay().getRotation(); int rotation = getWindowManager().getDefaultDisplay().getRotation();
captureBuilder.set(CaptureRequest.JPEG_ORIENTATION, getOrientation(rotation)); captureBuilder.set(CaptureRequest.JPEG_ORIENTATION, getOrientation(rotation) - 90);
// 停止预览执行拍照 // 停止预览执行拍照
captureSession.stopRepeating(); captureSession.stopRepeating();
@ -814,12 +911,15 @@ public class MainActivity extends AppCompatActivity {
CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP); CameraCharacteristics.SCALER_STREAM_CONFIGURATION_MAP);
previewSize = chooseOptimalSize(map.getOutputSizes(SurfaceTexture.class), previewSize = chooseOptimalSize(map.getOutputSizes(SurfaceTexture.class),
mSurfaceView.getWidth(), mSurfaceView.getHeight()); mSurfaceView.getWidth(), mSurfaceView.getHeight());
// 选择最佳拍照尺寸使用最大可用尺寸
Size[] jpegSizes = map.getOutputSizes(ImageFormat.JPEG);
Size largestJpegSize = Collections.max(Arrays.asList(jpegSizes), new CompareSizesByArea());
// 配置Surface // 配置Surface
mSurfaceView.getHolder().setFixedSize(previewSize.getWidth(), previewSize.getHeight()); mSurfaceView.getHolder().setFixedSize(previewSize.getWidth(), previewSize.getHeight());
// 创建ImageReader用于拍照 // 创建ImageReader用于拍照
imageReader = ImageReader.newInstance(previewSize.getWidth(), previewSize.getHeight(), imageReader = ImageReader.newInstance(largestJpegSize.getWidth(), largestJpegSize.getHeight(),
ImageFormat.JPEG, 2); ImageFormat.JPEG, 2);
imageReader.setOnImageAvailableListener(imageListener, backgroundHandler); imageReader.setOnImageAvailableListener(imageListener, backgroundHandler);
@ -1127,6 +1227,10 @@ public class MainActivity extends AppCompatActivity {
if (shutdownReceiver != null) { if (shutdownReceiver != null) {
unregisterReceiver(shutdownReceiver); unregisterReceiver(shutdownReceiver);
} }
if (dialog != null){
dialog.dismiss();
dialog = null;
}
mHandler.removeCallbacksAndMessages(null); // 清除所有的回调和消息 mHandler.removeCallbacksAndMessages(null); // 清除所有的回调和消息
if (timeShow != null) { if (timeShow != null) {
timeShow.setText(null); timeShow.setText(null);

View File

@ -19,14 +19,10 @@ package com.bonus.canteen.activity;
import android.view.KeyEvent; import android.view.KeyEvent;
import com.bonus.canteen.db.AppDatabase;
import com.bonus.canteen.db.entity.base.ParamSettingInfo;
import com.bonus.canteen.upgrade.UpdateDown; import com.bonus.canteen.upgrade.UpdateDown;
import com.bonus.canteen.utils.WorkConfig;
import com.xuexiang.xui.utils.KeyboardUtils; import com.xuexiang.xui.utils.KeyboardUtils;
import com.xuexiang.xui.widget.activity.BaseSplashActivity; import com.xuexiang.xui.widget.activity.BaseSplashActivity;
import com.xuexiang.xutil.app.ActivityUtils; import com.xuexiang.xutil.app.ActivityUtils;
import com.xuexiang.xutil.net.NetworkUtils;
import org.easydarwin.easypusher.R; import org.easydarwin.easypusher.R;
@ -64,23 +60,24 @@ public class SplashActivity extends BaseSplashActivity implements CancelAdapt {
} }
private void loginOrGoMainPage() { private void loginOrGoMainPage() {
if (NetworkUtils.isNetworkAvailable()) {
new Thread(() -> {
ParamSettingInfo paramSettingInfo = AppDatabase.getDatabase(this).parameterInfoDao().getOneInfo();
String url = WorkConfig.getBaseUrl();
if (paramSettingInfo != null){
url = paramSettingInfo.getIpAddress() + "/smart-canteen";
}
boolean isLatestVersion = down.checkUpdate(url);
runOnUiThread(() -> {
if (!isLatestVersion) {
navigateToNextPage(); navigateToNextPage();
} // if (NetworkUtils.isNetworkAvailable()) {
}); // ThreadPoolManager.getExecutor().execute(()->{
}).start(); // ParamSettingInfo paramSettingInfo = AppDatabase.getDatabase(this).parameterInfoDao().getOneInfo();
} else { // String url = WorkConfig.getBaseUrl();
navigateToNextPage(); // if (paramSettingInfo != null){
} // url = paramSettingInfo.getIpAddress() + "/smart-canteen";
// }
// boolean isLatestVersion = down.checkUpdate(url);
// runOnUiThread(() -> {
// if (!isLatestVersion) {
// navigateToNextPage();
// }
// });
// });
// } else {
// navigateToNextPage();
// }
} }
private void navigateToNextPage() { private void navigateToNextPage() {
ActivityUtils.startActivity(LoginActivity.class); ActivityUtils.startActivity(LoginActivity.class);

View File

@ -30,7 +30,6 @@ import android.widget.TextView;
import com.bonus.canteen.activity.MainActivity; import com.bonus.canteen.activity.MainActivity;
import com.bonus.canteen.entity.DishBean; import com.bonus.canteen.entity.DishBean;
import com.bonus.canteen.utils.StringHelper; import com.bonus.canteen.utils.StringHelper;
import com.xuexiang.xui.utils.XToastUtils;
import org.easydarwin.easypusher.R; import org.easydarwin.easypusher.R;
@ -83,7 +82,7 @@ public class DishAdapter extends BaseAdapter {
DishBean bean = list.get(i); DishBean bean = list.get(i);
Log.e("DishAdapter", "getView: " + bean); Log.e("DishAdapter", "getView: " + bean);
// 2. 移除旧的点击监听器避免复用残留 // 2. 移除旧的点击监听器避免复用残留
holder.dishName.setText(bean.getDishesName()); holder.dishName.setText(bean.getDishesName().length() > 5 ? bean.getDishesName().substring(0, 5) + "..." : bean.getDishesName());
boolean isSampled = StringHelper.isEmptyAndNull(bean.getSampleSaveTime()); boolean isSampled = StringHelper.isEmptyAndNull(bean.getSampleSaveTime());
holder.isRecord.setText(isSampled ? "未留样" : "已留样"); holder.isRecord.setText(isSampled ? "未留样" : "已留样");
holder.dishItemLinearLayout.setBackgroundResource( holder.dishItemLinearLayout.setBackgroundResource(
@ -93,11 +92,6 @@ public class DishAdapter extends BaseAdapter {
holder.dishItemLinearLayout.setOnClickListener(v -> { holder.dishItemLinearLayout.setOnClickListener(v -> {
// 通过 position 参数直接获取数据 // 通过 position 参数直接获取数据
DishBean clickedBean = list.get(i); DishBean clickedBean = list.get(i);
boolean isRecord = !StringHelper.isEmptyAndNull(bean.getSampleSaveTime());
Log.e("点击了", "ThreadUpdatesUI clickedBean" + clickedBean);
if (isRecord) {
XToastUtils.info("当前菜品已留样,无需重复留样!");
}else{
//对其他未留样菜品设置底色 //对其他未留样菜品设置底色
for (DishBean dish : list) { for (DishBean dish : list) {
if (StringHelper.isEmptyAndNull(dish.getSampleSaveTime())) { if (StringHelper.isEmptyAndNull(dish.getSampleSaveTime())) {
@ -105,12 +99,15 @@ public class DishAdapter extends BaseAdapter {
if (itemLayout != null) { if (itemLayout != null) {
itemLayout.setBackgroundResource(R.drawable.btn_border_bg_10_dark_blue); itemLayout.setBackgroundResource(R.drawable.btn_border_bg_10_dark_blue);
} }
}else{
LinearLayout itemLayout = (LinearLayout) viewGroup.getChildAt(list.indexOf(dish));
if (itemLayout != null)
itemLayout.setBackgroundResource(R.drawable.btn_border_bg_10_dark_green_1);
} }
} }
//设置当前选择菜品的底色 //设置当前选择菜品的底色
finalHolder.dishItemLinearLayout.setBackgroundResource(R.drawable.btn_border_bg_5_fe6d4b); finalHolder.dishItemLinearLayout.setBackgroundResource(R.drawable.btn_border_bg_5_fe6d4b);
mainActivity.updateDishDate(clickedBean); mainActivity.updateDishDate(clickedBean);
}
}); });
return convertView; return convertView;
} }

View File

@ -36,11 +36,11 @@ public class DateTimeHelper {
return format(new Date(),"HH:mm:ss"); return format(new Date(),"HH:mm:ss");
} }
public static String getTime(){ public static String getTime(){
return format(new Date(),"YYYY-MM-dd HH:mm:ss"); return format(new Date(),"yyyy-MM-dd HH:mm:ss");
} }
public static String getNowDate(){ public static String getNowDate(){
return format(new Date(),"YYYY-MM-dd"); return format(new Date(),"yyyy-MM-dd");
} }
public static String getCurrentTimeStr(){ public static String getCurrentTimeStr(){
return format(new Date(),"yyyyMMddHHmmssSSS"); return format(new Date(),"yyyyMMddHHmmssSSS");

View File

@ -24,14 +24,17 @@ public class WorkConfig {
private WorkConfig() { private WorkConfig() {
throw new UnsupportedOperationException("Cannot instantiate utility class"); throw new UnsupportedOperationException("Cannot instantiate utility class");
} }
//本地 //线上
protected static String baseUrl = "http://192.168.20.234:48390/smart-canteen"; protected static String baseUrl = "http://192.168.20.234:48390/smart-canteen";
protected static String prefixesUrl = "http://192.168.20.234:48390"; protected static String prefixesUrl = "http://192.168.20.234:48390";
// protected static String baseUrl = "http://192.168.0.244:48380/smart-canteen";
// protected static String prefixesUrl = "http://192.168.0.244:48380";
protected static String fileUrl = "http://192.168.20.234:9090/lnyst/"; protected static String fileUrl = "http://192.168.20.234:9090/lnyst/";
protected static String updateUrl = "https://www.baidu.com";
protected static String serverUri = "tcp://192.168.20.234:1883"; protected static String serverUri = "tcp://192.168.20.234:1883";
// protected static String baseUrl = "http://192.168.20.242:48380/smart-canteen";
// protected static String prefixesUrl = "http://192.168.20.242:48380";
// protected static String fileUrl = "http://192.168.20.242:9090/lnyst/";
// protected static String serverUri = "tcp://192.168.20.242:1883";
protected static String updateUrl = "https://www.baidu.com";
protected static String MqttUserName = "guest"; protected static String MqttUserName = "guest";
protected static String MqttPassWord = "Bonus@Rabbitmq123!"; protected static String MqttPassWord = "Bonus@Rabbitmq123!";
protected static String APP_ID = "52XE2dQBtdmMsfDMvyKmPCCPyFsc4jvo8TKvAdaYfr28"; protected static String APP_ID = "52XE2dQBtdmMsfDMvyKmPCCPyFsc4jvo8TKvAdaYfr28";

View File

@ -21,18 +21,18 @@
android:id="@+id/dish_item_linear_layout" android:id="@+id/dish_item_linear_layout"
android:background="@drawable/btn_border_bg_10_dark_blue" android:background="@drawable/btn_border_bg_10_dark_blue"
android:orientation="vertical" android:orientation="vertical"
android:padding="20dp"> android:padding="10dp">
<TextView <TextView
android:id="@+id/tv_dish_name" android:id="@+id/tv_dish_name"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="2" android:layout_weight="2"
android:layout_marginStart="@dimen/config_margin_10dp" android:layout_marginStart="@dimen/config_margin_5dp"
android:layout_marginEnd="@dimen/config_margin_10dp" android:layout_marginEnd="@dimen/config_margin_5dp"
android:gravity="center" android:gravity="center"
android:text="小肉包" android:text="小肉包"
android:textColor="@color/white" android:textColor="@color/white"
android:textSize="22sp" /> android:textSize="20sp" />
<TextView <TextView
android:id="@+id/tv_keep_sample_status" android:id="@+id/tv_keep_sample_status"
android:layout_width="match_parent" android:layout_width="match_parent"

View File

@ -82,7 +82,7 @@
android:maxLength="20" android:maxLength="20"
android:hint="@string/please_enter_username" android:hint="@string/please_enter_username"
android:textColorHint="#999999" android:textColorHint="#999999"
android:text="18158863319" android:text="15155587515"
android:inputType="textPersonName" android:inputType="textPersonName"
android:background="@android:color/transparent" android:background="@android:color/transparent"
android:paddingStart="10dp" android:paddingStart="10dp"
@ -116,7 +116,7 @@
android:layout_marginEnd="5dp" android:layout_marginEnd="5dp"
android:inputType="textPassword" android:inputType="textPassword"
android:paddingLeft="10dp" android:paddingLeft="10dp"
android:text="Bonus$2025" /> android:text="Bonus$2026" />
<ImageView <ImageView
android:id="@+id/check_password" android:id="@+id/check_password"

View File

@ -46,6 +46,15 @@
android:layout_marginEnd="20dp" android:layout_marginEnd="20dp"
android:background="@drawable/title_bg" android:background="@drawable/title_bg"
android:text="@string/sampleRetentionRecord" /> android:text="@string/sampleRetentionRecord" />
<Button
android:id="@+id/manualPrinting"
style="?android:attr/buttonBarButtonStyle"
android:layout_width="150dp"
android:layout_height="40dp"
android:layout_marginStart="10dp"
android:layout_marginEnd="20dp"
android:background="@drawable/title_bg"
android:text="@string/manualPrinting" />
<Button <Button
android:id="@+id/exit" android:id="@+id/exit"
style="?android:attr/buttonBarButtonStyle" style="?android:attr/buttonBarButtonStyle"

View File

@ -38,6 +38,7 @@
<string name="lab_no"></string> <string name="lab_no"></string>
<string name="lab_open_third_app">第三方APP</string> <string name="lab_open_third_app">第三方APP</string>
<string name="sampleRetentionRecord">留样记录</string> <string name="sampleRetentionRecord">留样记录</string>
<string name="manualPrinting">手动打印</string>
<string name="sampleRetentionRecordDetails">留样记录详情</string> <string name="sampleRetentionRecordDetails">留样记录详情</string>
<string name="exit">退出</string> <string name="exit">退出</string>
<string name="hello">您好,</string> <string name="hello">您好,</string>