feat(boot): 新增前台服务中转实现开机自启动
使用 BootService 前台服务绕过 Android 10+ 后台启动 Activity 限制, 通过 setFullScreenIntent 触发 InitActivity,兼容主从设备差异。 同时优化 MasterScaleActivity、SettingActivity 及相关布局。
This commit is contained in:
@@ -11,7 +11,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:layout_marginTop="20dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginBottom="10dp"
|
||||
android:text="全设备秤数据监控"
|
||||
android:textColor="@color/home_title"
|
||||
@@ -36,6 +36,7 @@
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:overScrollMode="never"
|
||||
android:padding="16dp" />
|
||||
android:padding="16dp"
|
||||
tools:listitem="@layout/list_item_scale_data"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
@@ -37,14 +37,14 @@
|
||||
android:textSize="26sp"
|
||||
android:background="@android:color/transparent" />
|
||||
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
android:id="@+id/btnDeviceRole"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="70dp"
|
||||
android:layout_weight="1"
|
||||
android:text="设备角色:子设备"
|
||||
android:textSize="22sp"
|
||||
android:background="@android:color/transparent" />
|
||||
<!-- <androidx.appcompat.widget.AppCompatButton-->
|
||||
<!-- android:id="@+id/btnDeviceRole"-->
|
||||
<!-- android:layout_width="0dp"-->
|
||||
<!-- android:layout_height="70dp"-->
|
||||
<!-- android:layout_weight="1"-->
|
||||
<!-- android:text="设备角色:子设备"-->
|
||||
<!-- android:textSize="22sp"-->
|
||||
<!-- android:background="@android:color/transparent" />-->
|
||||
|
||||
<androidx.appcompat.widget.AppCompatButton
|
||||
android:id="@+id/btnScaleMonitor"
|
||||
|
||||
@@ -7,8 +7,7 @@
|
||||
android:orientation="vertical"
|
||||
android:paddingStart="16dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:paddingTop="12dp"
|
||||
android:paddingBottom="12dp">
|
||||
android:paddingTop="10dp">
|
||||
|
||||
<!-- 设备 IP -->
|
||||
<TextView
|
||||
@@ -17,6 +16,7 @@
|
||||
android:layout_height="wrap_content"
|
||||
android:textSize="20sp"
|
||||
android:textStyle="bold"
|
||||
android:includeFontPadding="false"
|
||||
android:textColor="@color/home_title"
|
||||
tools:text="IP:192.168.1.100" />
|
||||
|
||||
@@ -37,4 +37,10 @@
|
||||
android:orientation="vertical"
|
||||
android:layout_marginTop="5dp" />
|
||||
|
||||
<com.google.android.material.divider.MaterialDivider
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:background="@color/gray_eb"
|
||||
android:layout_marginTop="10dp"/>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
Reference in New Issue
Block a user