Compare commits
No commits in common. 'cad4b58a465c395f6d8288a279e4747335160e3d' and '9707314aeeefd93c37bf2e555fb5b757a0e4f19c' have entirely different histories.
cad4b58a46
...
9707314aee
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="CompilerConfiguration">
|
<component name="CompilerConfiguration">
|
||||||
<bytecodeTargetLevel target="17" />
|
<bytecodeTargetLevel target="21" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
@ -1,48 +0,0 @@
|
|||||||
plugins {
|
|
||||||
alias(libs.plugins.android.application)
|
|
||||||
}
|
|
||||||
|
|
||||||
android {
|
|
||||||
namespace 'com.example.mobile_pda'
|
|
||||||
compileSdk 36
|
|
||||||
|
|
||||||
defaultConfig {
|
|
||||||
applicationId "com.example.mobile_pda"
|
|
||||||
minSdk 26
|
|
||||||
targetSdk 36
|
|
||||||
versionCode 1
|
|
||||||
versionName "1.0"
|
|
||||||
|
|
||||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
|
||||||
}
|
|
||||||
|
|
||||||
buildTypes {
|
|
||||||
release {
|
|
||||||
minifyEnabled false
|
|
||||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
compileOptions {
|
|
||||||
sourceCompatibility JavaVersion.VERSION_17
|
|
||||||
targetCompatibility JavaVersion.VERSION_17
|
|
||||||
}
|
|
||||||
|
|
||||||
buildFeatures {
|
|
||||||
viewBinding true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
dependencies {
|
|
||||||
implementation libs.appcompat
|
|
||||||
implementation libs.material
|
|
||||||
implementation libs.activity
|
|
||||||
implementation libs.constraintlayout
|
|
||||||
|
|
||||||
// Lifecycle components
|
|
||||||
implementation 'androidx.lifecycle:lifecycle-viewmodel:2.7.0'
|
|
||||||
implementation 'androidx.lifecycle:lifecycle-livedata:2.7.0'
|
|
||||||
|
|
||||||
testImplementation libs.junit
|
|
||||||
androidTestImplementation libs.ext.junit
|
|
||||||
androidTestImplementation libs.espresso.core
|
|
||||||
}
|
|
||||||
@ -0,0 +1,44 @@
|
|||||||
|
plugins {
|
||||||
|
alias(libs.plugins.android.application)
|
||||||
|
}
|
||||||
|
|
||||||
|
android {
|
||||||
|
namespace = "com.example.mobile_pda"
|
||||||
|
compileSdk {
|
||||||
|
version = release(36)
|
||||||
|
}
|
||||||
|
|
||||||
|
defaultConfig {
|
||||||
|
applicationId = "com.example.mobile_pda"
|
||||||
|
minSdk = 26
|
||||||
|
targetSdk = 36
|
||||||
|
versionCode = 1
|
||||||
|
versionName = "1.0"
|
||||||
|
|
||||||
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
|
}
|
||||||
|
|
||||||
|
buildTypes {
|
||||||
|
release {
|
||||||
|
isMinifyEnabled = false
|
||||||
|
proguardFiles(
|
||||||
|
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||||
|
"proguard-rules.pro"
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
compileOptions {
|
||||||
|
sourceCompatibility = JavaVersion.VERSION_11
|
||||||
|
targetCompatibility = JavaVersion.VERSION_11
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(libs.appcompat)
|
||||||
|
implementation(libs.material)
|
||||||
|
implementation(libs.activity)
|
||||||
|
implementation(libs.constraintlayout)
|
||||||
|
testImplementation(libs.junit)
|
||||||
|
androidTestImplementation(libs.ext.junit)
|
||||||
|
androidTestImplementation(libs.espresso.core)
|
||||||
|
}
|
||||||
@ -0,0 +1,78 @@
|
|||||||
|
package com.example.mobile_pda;
|
||||||
|
|
||||||
|
import android.os.Bundle;
|
||||||
|
import android.widget.Button;
|
||||||
|
import android.widget.EditText;
|
||||||
|
import android.widget.ImageButton;
|
||||||
|
import android.widget.TextView;
|
||||||
|
import android.widget.Toast;
|
||||||
|
|
||||||
|
import androidx.activity.EdgeToEdge;
|
||||||
|
import androidx.appcompat.app.AppCompatActivity;
|
||||||
|
|
||||||
|
public class MainActivity extends AppCompatActivity {
|
||||||
|
|
||||||
|
// 顶部按钮组件 -->开始、暂停、主页图标
|
||||||
|
private Button btnStartHeader, btnPauseHeader;
|
||||||
|
private ImageButton btnHome;
|
||||||
|
|
||||||
|
// 表单输入组件 --> 资源、产品条码、工单等数据项
|
||||||
|
private EditText etResource, etProductBarcode, etWorkOrder, etOpStep, etWorkNum, etProcess, etStatus, etWorkshop, etStartTime, etEndTime;
|
||||||
|
|
||||||
|
// SFC(生产控制) 区域按钮 --> 移除选项、移除全部
|
||||||
|
private TextView btnRemoveSelected, btnRemoveAll;
|
||||||
|
|
||||||
|
// 底部操作区按钮 --> 互检、开始、刀具、辅料、异常、装配、自检、首检、完成
|
||||||
|
private Button btnActionHujian, btnActionStart, btnActionTool, btnActionAux;
|
||||||
|
private Button btnActionException, btnActionAssemble, btnActionSelfCheck, btnActionFirstCheck, btnActionFinish;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
|
super.onCreate(savedInstanceState);
|
||||||
|
EdgeToEdge.enable(this);
|
||||||
|
// 启用全屏显示,适配系统栏(状态栏/导航栏)宽度占位
|
||||||
|
setContentView(R.layout.activity_main);
|
||||||
|
|
||||||
|
initViews();
|
||||||
|
setupListeners();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void initViews() {
|
||||||
|
// 顶部导航栏初始化
|
||||||
|
btnStartHeader = findViewById(R.id.btn_start_header);
|
||||||
|
btnPauseHeader = findViewById(R.id.btn_pause_header);
|
||||||
|
btnHome = findViewById(R.id.btn_home);
|
||||||
|
|
||||||
|
// 核心表单区域初始化
|
||||||
|
etResource = findViewById(R.id.et_resource);
|
||||||
|
etProductBarcode = findViewById(R.id.et_product_barcode);
|
||||||
|
etWorkOrder = findViewById(R.id.et_work_order);
|
||||||
|
etOpStep = findViewById(R.id.et_op_step);
|
||||||
|
etWorkNum = findViewById(R.id.et_work_num);
|
||||||
|
etProcess = findViewById(R.id.et_process);
|
||||||
|
etStatus = findViewById(R.id.et_status);
|
||||||
|
etWorkshop = findViewById(R.id.et_workshop);
|
||||||
|
etStartTime = findViewById(R.id.et_start_time);
|
||||||
|
etEndTime = findViewById(R.id.et_end_time);
|
||||||
|
|
||||||
|
// SFC 列表区域初始化
|
||||||
|
btnRemoveSelected = findViewById(R.id.btn_remove_selected);
|
||||||
|
btnRemoveAll = findViewById(R.id.btn_remove_all);
|
||||||
|
|
||||||
|
// 底部快捷操作按钮初始化
|
||||||
|
btnActionHujian = findViewById(R.id.btn_action_hujian);
|
||||||
|
btnActionStart = findViewById(R.id.btn_action_start);
|
||||||
|
btnActionTool = findViewById(R.id.btn_action_tool);
|
||||||
|
btnActionAux = findViewById(R.id.btn_action_aux);
|
||||||
|
btnActionException = findViewById(R.id.btn_action_exception);
|
||||||
|
btnActionAssemble = findViewById(R.id.btn_action_assemble);
|
||||||
|
btnActionSelfCheck = findViewById(R.id.btn_action_self_check);
|
||||||
|
btnActionFirstCheck = findViewById(R.id.btn_action_first_check);
|
||||||
|
btnActionFinish = findViewById(R.id.btn_action_finish);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void setupListeners() {
|
||||||
|
btnActionStart.setOnClickListener(v -> Toast.makeText(this, "Start Clicked", Toast.LENGTH_SHORT).show());
|
||||||
|
btnActionFinish.setOnClickListener(v -> Toast.makeText(this, "Finish Clicked", Toast.LENGTH_SHORT).show());
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,6 +1,3 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<resources>
|
<resources>
|
||||||
<string name="app_name">Mobile_PDA</string>
|
<string name="app_name">Mobile_PDA</string>
|
||||||
<string name="toast_start_clicked">开始被点击</string>
|
|
||||||
<string name="toast_finish_clicked">完成被点击</string>
|
|
||||||
</resources>
|
</resources>
|
||||||
Loading…
Reference in New Issue