[STYLE] 品牌更名為 Star Cloud、修正圖片快取並升版號至 _9

1. 品牌字串統一更名為「Star Cloud」:首頁歡迎標題(登入前/後)由「AAT」改為「Star Cloud」、標題副字串「智能販賣機系統」精簡為「智能系統」(MainActivity、activity_main.xml);刷卡收據抬頭「AAT」改為「Star Cloud」(dialog_credit_card_receipt.xml)。
2. 首頁主視覺由 vending_machine_scenario_v1 改用 starcloud_logo_circle,並新增 starcloudlogo.png 素材。
3. 修正 ImageGlide 圖片快取鍵:本機檔案以 lastModified() 為簽章(檔案未變則命中快取、避免滑動每格重抓;圖片更新時自動失效重載),URL 載入與例外路徑移除 currentTimeMillis() 簽章,修掉永遠顯示 loading 的問題。
4. build.gradle 版號 verPatch 由 6 升至 9(對應 21_02_9_R)。

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
sky121113 2026-06-17 19:36:27 +08:00
parent 16420ae5a3
commit 272164e0ed
6 changed files with 11 additions and 9 deletions

View File

@ -10,7 +10,7 @@ plugins {
//
// =========================================================================
def verMinor = 2
def verPatch = 6
def verPatch = 9

View File

@ -630,12 +630,12 @@ public class MainActivity extends AppCompatActivityAbstract {
private void updateLoginStatus() {
String suAccess = MyApp.getInstance().getSuAccess();
if (suAccess.isEmpty()) {
binding.tvWelcomeTitle.setText("歡迎使用 AAT\n智能販賣機系統");
binding.tvWelcomeTitle.setText("歡迎使用 Star Cloud\n智能系統");
binding.tvWelcomeHint.setText("請點擊右上角登入帳號");
binding.btnStatusAction.setText("登入");
binding.btnStatusAction.setBackgroundTintList(android.content.res.ColorStateList.valueOf(getResources().getColor(R.color.primary)));
} else {
binding.tvWelcomeTitle.setText("歡迎使用 AAT\n" + suAccess);
binding.tvWelcomeTitle.setText("歡迎使用 Star Cloud\n" + suAccess);
binding.tvWelcomeHint.setText("請點擊下方按鈕操作");
binding.btnStatusAction.setText("登出");
binding.btnStatusAction.setBackgroundTintList(android.content.res.ColorStateList.valueOf(getResources().getColor(R.color.error)));

View File

@ -56,14 +56,17 @@ public class ImageGlide {
.placeholder(R.drawable.loading)
.error(R.drawable.loading)
.diskCacheStrategy(DiskCacheStrategy.RESOURCE)
.signature(new ObjectKey(System.currentTimeMillis())) // 強制更新
// 以檔案修改時間當快取鍵檔案沒變命中快取(滑動不再每格重抓)
// 圖片更新時 lastModified 改變自動失效重載仍達強制更新效果
.signature(new ObjectKey(imageFile.lastModified()))
.into(imageView);
} else {
// 本機尚無檔案直接以 URL 載入Glide 預設以 URL 為快取鍵即可
// 不要再用 currentTimeMillis 否則每次綁定都視為新圖永遠顯示 loading
Glide.with(imageView).load(urlString)
.placeholder(R.drawable.loading)
.error(R.drawable.loading)
.diskCacheStrategy(DiskCacheStrategy.RESOURCE)
.signature(new ObjectKey(System.currentTimeMillis())) // 強制更新
.into(imageView);
}
} catch (LogsFileNullException e) {
@ -71,7 +74,6 @@ public class ImageGlide {
.placeholder(R.drawable.loading)
.error(R.drawable.loading)
.diskCacheStrategy(DiskCacheStrategy.RESOURCE)
.signature(new ObjectKey(System.currentTimeMillis())) // 強制更新
.into(imageView);
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 MiB

View File

@ -29,7 +29,7 @@
android:layout_marginEnd="24dp"
android:layout_marginBottom="8dp"
android:scaleType="fitCenter"
android:src="@drawable/vending_machine_scenario_v1_remove_background"
android:src="@drawable/starcloud_logo_circle"
android:elevation="9dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />
@ -53,7 +53,7 @@
android:id="@+id/tvWelcomeTitle"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="歡迎使用 StarCloud\n智能販賣機系統"
android:text="歡迎使用 Star Cloud\n智能系統"
android:textColor="@color/primary"
android:textSize="@dimen/welcome_title_text_size"
android:textStyle="bold" />

View File

@ -60,7 +60,7 @@
android:id="@+id/titleAATText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="AAT"
android:text="Star Cloud"
android:textSize="26sp"
android:textStyle="bold"
app:layout_constraintTop_toBottomOf="@id/headerLayout"