From a5134ce2852f46633bd3c5181cdd9855709b80ec Mon Sep 17 00:00:00 2001 From: amos Date: Wed, 3 Jun 2026 01:00:00 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=8E=BB=E9=99=A4=E6=90=9C=E7=B4=A2?= =?UTF-8?q?=E6=A1=86=EF=BC=8C=E6=B7=BB=E5=8A=A0=E5=8D=9A=E5=AE=A2=E5=8D=A0?= =?UTF-8?q?=E4=BD=8D=E9=AA=A8=E6=9E=B6=E5=B1=8F=EF=BC=8C=E8=BD=AE=E6=92=AD?= =?UTF-8?q?=E5=9B=BE=E5=9C=86=E8=A7=92=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/arkj/app/MainActivity.java | 23 +- app/src/main/res/drawable/bg_carousel.xml | 2 +- app/src/main/res/layout/activity_main.xml | 267 +++++++----------- 3 files changed, 112 insertions(+), 180 deletions(-) diff --git a/app/src/main/java/com/arkj/app/MainActivity.java b/app/src/main/java/com/arkj/app/MainActivity.java index bac9e55..73dd608 100644 --- a/app/src/main/java/com/arkj/app/MainActivity.java +++ b/app/src/main/java/com/arkj/app/MainActivity.java @@ -56,7 +56,6 @@ public class MainActivity extends Activity { @Override public void onPageStarted(WebView view, String url, Bitmap favicon) { super.onPageStarted(view, url, favicon); - // 开始加载 } @Override @@ -72,7 +71,6 @@ public class MainActivity extends Activity { @Override public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) { super.onReceivedError(view, errorCode, description, failingUrl); - // 加载失败,显示错误提示 if (loadingView != null) { loadingView.setVisibility(View.GONE); } @@ -80,61 +78,50 @@ public class MainActivity extends Activity { } }); - // 加载网络图片 - String html = "" + - "
" + - "" + + "" + + "onerror='document.body.innerHTML=\"
图片加载失败
\"' />" + "
" + ""; carouselWebView.loadDataWithBaseURL(null, html, "text/html", "UTF-8", null); } 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.btnMore).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/drawable/bg_carousel.xml b/app/src/main/res/drawable/bg_carousel.xml index a673136..80bd67b 100644 --- a/app/src/main/res/drawable/bg_carousel.xml +++ b/app/src/main/res/drawable/bg_carousel.xml @@ -1,5 +1,5 @@ - + diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml index ba067e1..a95121a 100644 --- a/app/src/main/res/layout/activity_main.xml +++ b/app/src/main/res/layout/activity_main.xml @@ -31,51 +31,6 @@ android:layout_marginTop="2dp"/> - - - - - - - - - - - - - - - + + android:layout_height="wrap_content" + android:orientation="vertical" + android:paddingHorizontal="24dp" + android:layout_marginBottom="80dp"> + + android:layout_height="80dp" + android:orientation="horizontal" + android:background="@drawable/bg_blog_card" + android:elevation="2dp" + android:layout_marginBottom="12dp" + android:padding="12dp" + android:gravity="center_vertical"> - + android:gravity="center_vertical"> - - - - + - - - - - - - - - - - - - - - - - - - + - + + + + + + + + + + + + + + + + + + + + + + + + + + +