[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:
parent
16420ae5a3
commit
272164e0ed
@ -10,7 +10,7 @@ plugins {
|
||||
// 避免不同尺寸機台間版本號產生衝突。
|
||||
// =========================================================================
|
||||
def verMinor = 2
|
||||
def verPatch = 6
|
||||
def verPatch = 9
|
||||
|
||||
|
||||
|
||||
|
||||
@ -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)));
|
||||
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
BIN
app/src/main/res/drawable/starcloudlogo.png
Normal file
BIN
app/src/main/res/drawable/starcloudlogo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.7 MiB |
@ -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" />
|
||||
|
||||
@ -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"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user