Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fa30960437 | ||
|
|
a5134ce285 |
@@ -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 = "<html><body style='margin:0;padding:0;background:#f3f4f6;'>" +
|
||||
"<div style='display:flex;align-items:center;justify-content:center;height:100vh;margin:0;'>" +
|
||||
"<img src='" + CAROUSEL_URL + "' style='width:100%;height:100%;object-fit:cover;' " +
|
||||
// 加载网络图片 - 添加圆角样式
|
||||
String html = "<html><body style='margin:0;padding:0;background:#f3f4f6;border-radius:16px;overflow:hidden;'>" +
|
||||
"<div style='display:flex;align-items:center;justify-content:center;height:100vh;margin:0;border-radius:16px;overflow:hidden;'>" +
|
||||
"<img src='" + CAROUSEL_URL + "' style='width:100%;height:100%;object-fit:cover;border-radius:16px;' " +
|
||||
"onload='document.body.style.height=\"auto\"' " +
|
||||
"onerror='document.body.innerHTML=\"<div style=\\\"color:#999;text-align:center;padding:20px;\\\">图片加载失败</div>\"' />" +
|
||||
"onerror='document.body.innerHTML=\"<div style=\\\"color:#999;text-align:center;padding:20px;font-family:sans-serif;\\\">图片加载失败</div>\"' />" +
|
||||
"</div>" +
|
||||
"</body></html>";
|
||||
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());
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- 轮播图背景卡片 -->
|
||||
<!-- 轮播图背景 - 圆角 -->
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<solid android:color="#FFFFFF"/>
|
||||
|
||||
@@ -5,498 +5,457 @@
|
||||
android:orientation="vertical"
|
||||
android:background="@drawable/bg_gradient">
|
||||
|
||||
<!-- 顶部欢迎区域 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:padding="24dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="早上好"
|
||||
android:textSize="14sp"
|
||||
android:textColor="#6B7280"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="ARKJ"
|
||||
android:textSize="28sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="#1F2937"
|
||||
android:layout_marginTop="2dp"/>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 搜索栏 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="24dp"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginBottom="16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="48dp"
|
||||
android:layout_weight="1"
|
||||
android:orientation="horizontal"
|
||||
android:background="@drawable/bg_search"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:gravity="center_vertical"
|
||||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:src="@drawable/ic_search"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/search_hint"
|
||||
android:textColor="#6B7280"
|
||||
android:textSize="15sp"
|
||||
android:layout_marginStart="12dp"/>
|
||||
</LinearLayout>
|
||||
|
||||
<ImageView
|
||||
android:layout_width="44dp"
|
||||
android:layout_height="44dp"
|
||||
android:src="@drawable/ic_scan"
|
||||
android:padding="10dp"
|
||||
android:layout_marginStart="12dp"
|
||||
android:background="@drawable/bg_card"
|
||||
android:clickable="true"
|
||||
android:focusable="true"/>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 轮播图区域(含加载指示器) -->
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="180dp"
|
||||
android:layout_marginHorizontal="24dp"
|
||||
android:layout_marginBottom="20dp">
|
||||
|
||||
<!-- 加载指示器 -->
|
||||
<ProgressBar
|
||||
android:id="@+id/carouselLoading"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:indeterminateTint="#6366F1"/>
|
||||
|
||||
<!-- WebView 初始隐藏,加载完成后显示 -->
|
||||
<WebView
|
||||
android:id="@+id/carouselWebView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/bg_carousel"
|
||||
android:elevation="4dp"
|
||||
android:visibility="invisible"/>
|
||||
</FrameLayout>
|
||||
|
||||
<!-- 功能网格标题 -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="功能"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="#1F2937"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginBottom="12dp"/>
|
||||
|
||||
<!-- 功能网格 -->
|
||||
<GridLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:rowCount="2"
|
||||
android:columnCount="4"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:alignmentMode="alignMargins">
|
||||
|
||||
<!-- 备忘录 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/btnMemo"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_columnWeight="1"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:padding="12dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:src="@drawable/ic_memo"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/memo"
|
||||
android:textColor="#374151"
|
||||
android:textSize="13sp"
|
||||
android:layout_marginTop="6dp"/>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 二维码 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/btnQRCode"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_columnWeight="1"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:padding="12dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:src="@drawable/ic_qrcode"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/qrcode"
|
||||
android:textColor="#374151"
|
||||
android:textSize="13sp"
|
||||
android:layout_marginTop="6dp"/>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 谁在干活 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/btnWhoWorking"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_columnWeight="1"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:padding="12dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:src="@drawable/ic_star"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/who_working"
|
||||
android:textColor="#374151"
|
||||
android:textSize="13sp"
|
||||
android:layout_marginTop="6dp"/>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- PVE -->
|
||||
<LinearLayout
|
||||
android:id="@+id/btnPVE"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_columnWeight="1"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:padding="12dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:src="@drawable/ic_pve"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/pve"
|
||||
android:textColor="#374151"
|
||||
android:textSize="13sp"
|
||||
android:layout_marginTop="6dp"/>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 快递 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/btnExpress"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_columnWeight="1"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:padding="12dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:src="@drawable/ic_express"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/express"
|
||||
android:textColor="#374151"
|
||||
android:textSize="13sp"
|
||||
android:layout_marginTop="6dp"/>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 纪念日 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/btnAnniversary"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_columnWeight="1"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:padding="12dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:src="@drawable/ic_anniversary"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/anniversary"
|
||||
android:textColor="#374151"
|
||||
android:textSize="13sp"
|
||||
android:layout_marginTop="6dp"/>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 记账 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/btnAccounting"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_columnWeight="1"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:padding="12dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:src="@drawable/ic_accounting"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/accounting"
|
||||
android:textColor="#374151"
|
||||
android:textSize="13sp"
|
||||
android:layout_marginTop="6dp"/>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 更多 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/btnMore"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_columnWeight="1"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:padding="12dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:src="@drawable/ic_more"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="更多"
|
||||
android:textColor="#374151"
|
||||
android:textSize="13sp"
|
||||
android:layout_marginTop="6dp"/>
|
||||
</LinearLayout>
|
||||
</GridLayout>
|
||||
|
||||
<!-- 博客标题 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginTop="24dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:layout_marginBottom="12dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/ic_blog"
|
||||
android:layout_marginEnd="8dp"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/blog_title"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="#1F2937"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="更多 >"
|
||||
android:textColor="#6366F1"
|
||||
android:textSize="14sp"
|
||||
android:clickable="true"
|
||||
android:focusable="true"/>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 博客列表 -->
|
||||
<!-- 可滚动内容区域 -->
|
||||
<ScrollView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="0dp"
|
||||
android:layout_weight="1"
|
||||
android:clipToPadding="false"
|
||||
android:paddingBottom="80dp">
|
||||
android:fillViewport="true">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:paddingHorizontal="24dp">
|
||||
android:orientation="vertical">
|
||||
|
||||
<!-- 博客卡片 1 -->
|
||||
<!-- 顶部欢迎区域 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:background="@drawable/bg_blog_card"
|
||||
android:elevation="2dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
android:padding="24dp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginBottom="8dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Android 开发入门"
|
||||
android:textSize="16sp"
|
||||
android:text="早上好"
|
||||
android:textSize="14sp"
|
||||
android:textColor="#6B7280"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="ARKJ"
|
||||
android:textSize="28sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="#1F2937"
|
||||
android:layout_marginBottom="8dp"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="学习 Android 开发的基础知识,包括 Activity、Fragment 等核心概念..."
|
||||
android:textColor="#6B7280"
|
||||
android:textSize="14sp"
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="2 小时前"
|
||||
android:textColor="#9CA3AF"
|
||||
android:textSize="12sp"
|
||||
android:layout_marginTop="8dp"/>
|
||||
android:layout_marginTop="2dp"/>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 博客卡片 2 -->
|
||||
<!-- 轮播图区域(含加载指示器) -->
|
||||
<FrameLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="180dp"
|
||||
android:layout_marginHorizontal="24dp"
|
||||
android:layout_marginBottom="20dp">
|
||||
|
||||
<!-- 加载指示器 -->
|
||||
<ProgressBar
|
||||
android:id="@+id/carouselLoading"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:indeterminateTint="#6366F1"/>
|
||||
|
||||
<!-- WebView 初始隐藏,加载完成后显示 -->
|
||||
<WebView
|
||||
android:id="@+id/carouselWebView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@drawable/bg_carousel"
|
||||
android:elevation="4dp"
|
||||
android:visibility="invisible"/>
|
||||
</FrameLayout>
|
||||
|
||||
<!-- 功能网格标题 -->
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="功能"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="#1F2937"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginBottom="12dp"/>
|
||||
|
||||
<!-- 功能网格 -->
|
||||
<GridLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:rowCount="2"
|
||||
android:columnCount="4"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:alignmentMode="alignMargins">
|
||||
|
||||
<!-- 备忘录 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/btnMemo"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_columnWeight="1"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:padding="12dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:src="@drawable/ic_memo"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/memo"
|
||||
android:textColor="#374151"
|
||||
android:textSize="13sp"
|
||||
android:layout_marginTop="6dp"/>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 二维码 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/btnQRCode"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_columnWeight="1"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:padding="12dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:src="@drawable/ic_qrcode"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/qrcode"
|
||||
android:textColor="#374151"
|
||||
android:textSize="13sp"
|
||||
android:layout_marginTop="6dp"/>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 谁在干活 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/btnWhoWorking"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_columnWeight="1"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:padding="12dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:src="@drawable/ic_star"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/who_working"
|
||||
android:textColor="#374151"
|
||||
android:textSize="13sp"
|
||||
android:layout_marginTop="6dp"/>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- PVE -->
|
||||
<LinearLayout
|
||||
android:id="@+id/btnPVE"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_columnWeight="1"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:padding="12dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:src="@drawable/ic_pve"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/pve"
|
||||
android:textColor="#374151"
|
||||
android:textSize="13sp"
|
||||
android:layout_marginTop="6dp"/>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 快递 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/btnExpress"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_columnWeight="1"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:padding="12dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:src="@drawable/ic_express"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/express"
|
||||
android:textColor="#374151"
|
||||
android:textSize="13sp"
|
||||
android:layout_marginTop="6dp"/>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 纪念日 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/btnAnniversary"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_columnWeight="1"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:padding="12dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:src="@drawable/ic_anniversary"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/anniversary"
|
||||
android:textColor="#374151"
|
||||
android:textSize="13sp"
|
||||
android:layout_marginTop="6dp"/>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 记账 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/btnAccounting"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_columnWeight="1"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:padding="12dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:src="@drawable/ic_accounting"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/accounting"
|
||||
android:textColor="#374151"
|
||||
android:textSize="13sp"
|
||||
android:layout_marginTop="6dp"/>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 更多 -->
|
||||
<LinearLayout
|
||||
android:id="@+id/btnMore"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_columnWeight="1"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:padding="12dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="48dp"
|
||||
android:layout_height="48dp"
|
||||
android:src="@drawable/ic_more"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="更多"
|
||||
android:textColor="#374151"
|
||||
android:textSize="13sp"
|
||||
android:layout_marginTop="6dp"/>
|
||||
</LinearLayout>
|
||||
</GridLayout>
|
||||
|
||||
<!-- 博客标题 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:background="@drawable/bg_blog_card"
|
||||
android:elevation="2dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_marginTop="24dp"
|
||||
android:layout_marginStart="24dp"
|
||||
android:layout_marginEnd="24dp"
|
||||
android:layout_marginBottom="12dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:src="@drawable/ic_blog"
|
||||
android:layout_marginEnd="8dp"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Kotlin 协程详解"
|
||||
android:textSize="16sp"
|
||||
android:layout_weight="1"
|
||||
android:text="@string/blog_title"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="#1F2937"
|
||||
android:layout_marginBottom="8dp"/>
|
||||
android:textColor="#1F2937"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="深入理解 Kotlin 协程的工作原理,掌握异步编程的最佳实践..."
|
||||
android:textColor="#6B7280"
|
||||
android:text="更多 >"
|
||||
android:textColor="#6366F1"
|
||||
android:textSize="14sp"
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end"/>
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="昨天"
|
||||
android:textColor="#9CA3AF"
|
||||
android:textSize="12sp"
|
||||
android:layout_marginTop="8dp"/>
|
||||
android:clickable="true"
|
||||
android:focusable="true"/>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 博客卡片 3 -->
|
||||
<!-- 博客列表占位 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:background="@drawable/bg_blog_card"
|
||||
android:elevation="2dp"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:clickable="true"
|
||||
android:focusable="true">
|
||||
android:paddingHorizontal="24dp"
|
||||
android:layout_marginBottom="16dp">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Jetpack Compose 实战"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
android:textColor="#1F2937"
|
||||
android:layout_marginBottom="8dp"/>
|
||||
<!-- 博客占位 1 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
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">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="使用 Jetpack Compose 构建现代化的 Android 界面,声明式 UI 的魅力..."
|
||||
android:textColor="#6B7280"
|
||||
android:textSize="14sp"
|
||||
android:maxLines="2"
|
||||
android:ellipsize="end"/>
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="3 天前"
|
||||
android:textColor="#9CA3AF"
|
||||
android:textSize="12sp"
|
||||
android:layout_marginTop="8dp"/>
|
||||
<View
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="16dp"
|
||||
android:background="#E5E7EB"
|
||||
android:layout_marginBottom="8dp"/>
|
||||
|
||||
<View
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="12dp"
|
||||
android:background="#F3F4F6"/>
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:background="#E5E7EB"
|
||||
android:layout_marginStart="12dp"/>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 博客占位 2 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
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">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<View
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="16dp"
|
||||
android:background="#E5E7EB"
|
||||
android:layout_marginBottom="8dp"/>
|
||||
|
||||
<View
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="12dp"
|
||||
android:background="#F3F4F6"/>
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:background="#E5E7EB"
|
||||
android:layout_marginStart="12dp"/>
|
||||
</LinearLayout>
|
||||
|
||||
<!-- 博客占位 3 -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
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">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_weight="1"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center_vertical">
|
||||
|
||||
<View
|
||||
android:layout_width="120dp"
|
||||
android:layout_height="16dp"
|
||||
android:background="#E5E7EB"
|
||||
android:layout_marginBottom="8dp"/>
|
||||
|
||||
<View
|
||||
android:layout_width="200dp"
|
||||
android:layout_height="12dp"
|
||||
android:background="#F3F4F6"/>
|
||||
</LinearLayout>
|
||||
|
||||
<View
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:background="#E5E7EB"
|
||||
android:layout_marginStart="12dp"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
||||
<!-- 底部导航 -->
|
||||
<!-- 底部导航(固定在底部) -->
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
@@ -567,4 +526,4 @@
|
||||
android:layout_marginTop="4dp"/>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
Reference in New Issue
Block a user