docs(android): 完整方案 + logo 资源 + 启动屏
新增 docs/android/ 目录: - README.md 总入口(快速上手 + 决策摘要 + 数据流) - 01-architecture.md 模块划分 + 数据流 + 选型理由 - 02-api-contract.md 每个接口的请求/响应 + DTO 字段映射 - 03-build-run.md Gradle/SDK/网络安全白名单/真机调试 - 04-milestones.md 7 天里程碑 + DoD + E2E 测试场景 新增 assets/: - logo/: 主图标 master + adaptive icon + 5 DPI launcher (方/圆) - splash/: 启动屏 logo + 完整背景预览 + 5 DPI 资源 - android_resources/: 集成所需的 XML(adaptive icon/主题/颜色/字符串/drawable/layout) - INTEGRATION.md 集成指南 - logo.svg + _make_logo.py 设计源 设计风格:参考用户提供的木质方块字母积木图,米色木纹底 + 深棕色字母 D,代表 'Diary',温暖私人日记感。 服务器体检:所有容器/API/DB/翻译主链路正常,TMT 本月已用 0.37%。 MaaS 备用通道上次已验证可用。
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
启动屏背景 drawable(用于 Android 11 及以下的 windowBackground)
|
||||
- 米色木纹底
|
||||
- 中央 logo + app 名
|
||||
-->
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!-- 底层:木色背景 -->
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<gradient
|
||||
android:type="linear"
|
||||
android:angle="90"
|
||||
android:startColor="#F5E9D0"
|
||||
android:centerColor="#E8D4A8"
|
||||
android:endColor="#C9A876" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
<!-- 中央 logo 图标(用 bitmap 引用,需要把 splash_logo.png 放进来)-->
|
||||
<!-- 实际项目中,把生成好的 splash_logo.png 放到 drawable-xxhdpi/ 等目录 -->
|
||||
<item android:gravity="center" android:top="-40dp">
|
||||
<bitmap
|
||||
android:src="@drawable/ic_splash_logo"
|
||||
android:gravity="center" />
|
||||
</item>
|
||||
|
||||
</layer-list>
|
||||
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
启动屏 layout(SplashScreen API 12+ 用)
|
||||
- 背景 = 木色
|
||||
- 中心 = logo + app 名 + 副标题
|
||||
- 不依赖任何外部依赖,纯原生
|
||||
-->
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:background="@color/splash_background">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/splash_logo"
|
||||
android:layout_width="@dimen/splash_logo_size"
|
||||
android:layout_height="@dimen/splash_logo_size"
|
||||
android:src="@drawable/ic_splash_logo"
|
||||
android:contentDescription="@string/app_name"
|
||||
android:layout_marginBottom="24dp" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/splash_title"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/app_name"
|
||||
android:textColor="@color/splash_letter"
|
||||
android:textSize="40sp"
|
||||
android:textStyle="bold"
|
||||
android:fontFamily="sans-serif" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/splash_subtitle"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/splash_subtitle"
|
||||
android:textColor="@color/splash_subtitle"
|
||||
android:textSize="16sp"
|
||||
android:layout_marginTop="8dp"
|
||||
android:fontFamily="sans-serif" />
|
||||
|
||||
</LinearLayout>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@mipmap/ic_launcher_background"/>
|
||||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||
</adaptive-icon>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@mipmap/ic_launcher_background"/>
|
||||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
||||
</adaptive-icon>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- 木质积木色调,跟 logo 一致 -->
|
||||
<color name="splash_background">#F5E9D0</color>
|
||||
<color name="splash_letter">#3E2A1E</color>
|
||||
<color name="splash_subtitle">#5A4128</color>
|
||||
</resources>
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- 启动屏 logo 尺寸(根据屏宽自适应,这里用 dp)-->
|
||||
<dimen name="splash_logo_size">160dp</dimen>
|
||||
</resources>
|
||||
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- 启动屏要用的副标题(中英两版都备一份)-->
|
||||
<string name="splash_subtitle">Your Private News Diary</string>
|
||||
<string name="splash_subtitle_zh">你的私人新闻日报</string>
|
||||
</resources>
|
||||
@@ -0,0 +1,23 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
SplashScreen API(Android 12+, API 31+)主题
|
||||
用 Theme.SplashScreen 库,需要在 build.gradle 依赖 androidx.core:core-splashscreen
|
||||
-->
|
||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<!-- Android 12+ 启动屏主题(API 31+)-->
|
||||
<style name="Theme.App.Starting" parent="Theme.SplashScreen">
|
||||
<item name="windowSplashScreenBackground">@color/splash_background</item>
|
||||
<item name="windowSplashScreenAnimatedIcon">@mipmap/ic_launcher_foreground</item>
|
||||
<item name="windowSplashScreenAnimationDuration">200</item>
|
||||
<item name="postSplashScreenTheme">@style/Theme.DiaryNews</item>
|
||||
</style>
|
||||
|
||||
<!-- Android 11 及以下启动屏主题(API < 31)— 用自定义 drawable 作 background-->
|
||||
<style name="Theme.App.Starting.Legacy" parent="Theme.DiaryNews">
|
||||
<item name="android:windowBackground">@drawable/splash_screen</item>
|
||||
<item name="android:statusBarColor">@color/splash_background</item>
|
||||
<item name="android:navigationBarColor">@color/splash_background</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
||||
Reference in New Issue
Block a user