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"> - - - - + - - - - - - - - - - - - - - - - - - - + - + + + + + + + + + + + + + + + + + + + + + + + + + + +