diff --git a/app/src/main/java/com/arkj/app/MainActivity.java b/app/src/main/java/com/arkj/app/MainActivity.java index f5559cf..6729a66 100644 --- a/app/src/main/java/com/arkj/app/MainActivity.java +++ b/app/src/main/java/com/arkj/app/MainActivity.java @@ -2,68 +2,11 @@ package com.arkj.app; import android.app.Activity; import android.os.Bundle; -import android.view.View; -import android.widget.Toast; -import android.widget.LinearLayout; public class MainActivity extends Activity { @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); - - // 设置功能按钮点击事件 - setupFunctionButtons(); - - // 设置底部导航点击事件 - setupBottomNavigation(); - } - - private void setupFunctionButtons() { - // 备忘录 - findViewById(R.id.btnMemo).setOnClickListener(v -> - Toast.makeText(this, "打开备忘录", Toast.LENGTH_SHORT).show()); - - // 二维码 - findViewById(R.id.btnQRCode).setOnClickListener(v -> - Toast.makeText(this, "打开二维码扫描", Toast.LENGTH_SHORT).show()); - - // 谁在干活 - findViewById(R.id.btnWhoWorking).setOnClickListener(v -> - Toast.makeText(this, "查看谁在干活", Toast.LENGTH_SHORT).show()); - - // PVE - findViewById(R.id.btnPVE).setOnClickListener(v -> - Toast.makeText(this, "打开 PVE", Toast.LENGTH_SHORT).show()); - - // 快递 - findViewById(R.id.btnExpress).setOnClickListener(v -> - Toast.makeText(this, "查看快递", Toast.LENGTH_SHORT).show()); - - // 纪念日 - findViewById(R.id.btnAnniversary).setOnClickListener(v -> - Toast.makeText(this, "查看纪念日", Toast.LENGTH_SHORT).show()); - - // 记账 - findViewById(R.id.btnAccounting).setOnClickListener(v -> - Toast.makeText(this, "打开记账", Toast.LENGTH_SHORT).show()); - - // 资料 - findViewById(R.id.btnMaterials).setOnClickListener(v -> - Toast.makeText(this, "查看资料", Toast.LENGTH_SHORT).show()); - } - - private void setupBottomNavigation() { - // 首页 - findViewById(R.id.navHome).setOnClickListener(v -> - Toast.makeText(this, "已在首页", Toast.LENGTH_SHORT).show()); - - // 中间按钮 - findViewById(R.id.navCenter).setOnClickListener(v -> - Toast.makeText(this, "快速操作", Toast.LENGTH_SHORT).show()); - - // 我的 - findViewById(R.id.navProfile).setOnClickListener(v -> - Toast.makeText(this, "打开个人中心", Toast.LENGTH_SHORT).show()); } } diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index 75b5eed..e248bc7 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -1,420 +1,14 @@ - + android:orientation="vertical" + android:gravity="center"> - + android:text="ARKJ" + android:textSize="32sp"/> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +