fix(config): 更新应用配置和设备方向设置
- 在InitActivity中添加竖屏显示配置 - 注释掉BaseActivity中的动态屏幕方向逻辑 - 修改应用ID为com.shuwei.dish.match.new - 将应用名称从菜品配比终端改为配比秤新 - 恢复称重设备端口为/dev/ttyS4
This commit is contained in:
@@ -16,7 +16,7 @@ android {
|
||||
compileSdk = 36
|
||||
|
||||
defaultConfig {
|
||||
applicationId = "com.shuwei.dish.match"
|
||||
applicationId = "com.shuwei.dish.match.new"
|
||||
minSdk = 29
|
||||
targetSdk = 36
|
||||
versionCode = 1
|
||||
|
||||
@@ -46,6 +46,7 @@
|
||||
android:name=".ui.InitActivity"
|
||||
android:exported="true"
|
||||
android:launchMode="singleTask"
|
||||
android:screenOrientation="portrait"
|
||||
android:configChanges="orientation|screenSize|smallestScreenSize|screenLayout|keyboardHidden|keyboard|navigation|uiMode|locale|layoutDirection|fontScale|density"
|
||||
tools:ignore="DiscouragedApi,LockedOrientationActivity">
|
||||
<intent-filter>
|
||||
|
||||
@@ -51,10 +51,10 @@ open class BaseActivity : AppCompatActivity() {
|
||||
// 提前隐藏系统栏,避免窗口创建时导航栏闪烁
|
||||
hideSystemBars()
|
||||
// 主设备竖屏,子设备横屏
|
||||
requestedOrientation = if (GlobalData.deviceRole == DeviceRole.MASTER)
|
||||
ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
|
||||
else
|
||||
ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE
|
||||
// requestedOrientation = if (GlobalData.deviceRole == DeviceRole.MASTER)
|
||||
// ActivityInfo.SCREEN_ORIENTATION_PORTRAIT
|
||||
// else
|
||||
// ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE
|
||||
ActivityManager.addActivity(this)
|
||||
binding = ActivityBaseBinding.inflate(layoutInflater)
|
||||
if (this !is InitActivity || GlobalData.deviceRole == DeviceRole.SLAVE) {
|
||||
|
||||
@@ -26,8 +26,8 @@ public class Weigher2 {
|
||||
public static final int ERR_004 = 1004;
|
||||
public static final int ERR_PCB_NOT_SUPPORT = 2000;
|
||||
private static FixedSensorScale mSensorScale;
|
||||
// private static String mDevicePort = "/dev/ttyS4";
|
||||
private static String mDevicePort = "/dev/ttyS7";
|
||||
private static String mDevicePort = "/dev/ttyS4";
|
||||
// private static String mDevicePort = "/dev/ttyS7";
|
||||
private static boolean mConnect = false;
|
||||
private static Listener mListener;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<resources>
|
||||
<string name="app_name">菜品配比终端</string>
|
||||
<string name="app_name">配比秤新</string>
|
||||
<string name="sp_save_name">dish_match_terminal</string>
|
||||
<string name="home_title">菜品配比终端</string>
|
||||
<string name="home_sub_title">选择菜品模式</string>
|
||||
|
||||
Reference in New Issue
Block a user