diff --git a/gallery/src/main/AndroidManifest.xml b/gallery/src/main/AndroidManifest.xml index be26880..e806f31 100644 --- a/gallery/src/main/AndroidManifest.xml +++ b/gallery/src/main/AndroidManifest.xml @@ -46,6 +46,14 @@ + + + + - * @Date 2026/01/11 12:55 - * @Describe AboutActivity - */ -public class AboutActivity extends Activity { +public class AboutActivity extends AppCompatActivity { public static final String TAG = "AboutActivity"; @@ -22,23 +17,21 @@ public class AboutActivity extends Activity { super.onCreate(savedInstanceState); setContentView(R.layout.activity_about); - // 设置工具栏 Toolbar toolbar = findViewById(R.id.toolbar); - setActionBar(toolbar); - getActionBar().setSubtitle(TAG); - getActionBar().setDisplayHomeAsUpEnabled(true); + setSupportActionBar(toolbar); + getSupportActionBar().setDisplayHomeAsUpEnabled(true); toolbar.setNavigationOnClickListener(new View.OnClickListener() { - @Override - public void onClick(View v) { - finish(); // 点击导航栏返回按钮,触发 finish() - } - }); + @Override + public void onClick(View v) { + finish(); + } + }); - AboutView aboutView = findViewById(R.id.aboutview); - aboutView.setAPPInfo(genDefaultAppInfo()); + AboutView aboutView = findViewById(R.id.aboutview); + aboutView.setAPPInfo(genDefaultAppInfo()); } - private APPInfo genDefaultAppInfo() { + private APPInfo genDefaultAppInfo() { LogUtils.d(TAG, "genDefaultAppInfo() 调用"); String branchName = "gallery"; APPInfo appInfo = new APPInfo(); @@ -55,4 +48,4 @@ public class AboutActivity extends Activity { LogUtils.d(TAG, "genDefaultAppInfo: 应用信息已生成"); return appInfo; } -} +} \ No newline at end of file diff --git a/gallery/src/main/java/cc/winboll/studio/gallery/MainActivity.java b/gallery/src/main/java/cc/winboll/studio/gallery/MainActivity.java index ffe1462..0c64e6b 100644 --- a/gallery/src/main/java/cc/winboll/studio/gallery/MainActivity.java +++ b/gallery/src/main/java/cc/winboll/studio/gallery/MainActivity.java @@ -281,18 +281,14 @@ private void loadAlbums() { if (id == R.id.action_settings) { startActivity(new Intent(this, SettingsActivity.class)); return true; + } else if (id == R.id.action_about) { + startActivity(new Intent(this, AboutActivity.class)); + return true; } else if (id == R.id.action_trash) { startActivity(new Intent(this, TrashActivity.class)); return true; - } else if (id == R.id.action_refresh) { - if (checkPermission()) { - loadAlbums(); - } - return true; } else if (id == R.id.action_debug) { - LogActivity.startLogActivity(this); -// Log.d("Gallery", "Debug log message"); -// Toast.makeText(this, R.string.debug_message, Toast.LENGTH_SHORT).show(); + LogActivity.startLogActivity(this); return true; } return super.onOptionsItemSelected(item); @@ -308,6 +304,7 @@ private void loadAlbums() { if (adapter != null) { adapter.refreshBg(); adapter.refreshPinned(); + adapter.refreshCover(); } } diff --git a/gallery/src/main/res/layout/activity_about.xml b/gallery/src/main/res/layout/activity_about.xml index bfd02eb..790b67d 100644 --- a/gallery/src/main/res/layout/activity_about.xml +++ b/gallery/src/main/res/layout/activity_about.xml @@ -1,21 +1,33 @@ - + - + - + + + - + + + + + + \ No newline at end of file diff --git a/gallery/src/main/res/menu/menu_main.xml b/gallery/src/main/res/menu/menu_main.xml index 52f9b57..1264d7a 100644 --- a/gallery/src/main/res/menu/menu_main.xml +++ b/gallery/src/main/res/menu/menu_main.xml @@ -13,8 +13,8 @@ app:showAsAction="never"/> Refresh Settings Settings + About Folder Path Enter folder path Save