feat(settings): drag-to-reorder page order in UI Settings card
Users can now change the bottom navigation order (previously fixed): - New "Page order" section under the Settings toggle in the UI Settings card: vertical list of all 7 pages, each with a drag handle (new ic_drag drawable, Material drag_indicator glyph) on the right. - Drag a handle up/down: the item follows the finger with live swap + animateItem() placement animation; on release the order is persisted (OtherSettings.screenOrder, comma-separated in prefs so order survives; StringSet would not). - "Reset order" button restores the default order (Satellites/Passes/Radar/Mutual/Roaming/Map/Settings). - MainScreen now sorts navItems by screenOrder (empty = default, stable sort keeps the canonical order); hiddenScreens filtering unchanged; Settings entry always visible. - New strings prefs_ui_order_title / prefs_ui_order_reset in en/zh/tr; What's-new updated in all three locales. Version stays 4.4.9 (覆盖 per user). Verified: core:data tests pass, settings + app compile.
This commit is contained in:
1 parent
c496d90d5a
commit
0ea9c0ede1
11 files changed
+150
-4
No files matched your search
@@ -45,6 +45,9 @@ sealed class Screen(val iconResId: Int, val titleResId: Int, val screenId: Strin
|
||||
data object Settings : Screen(R.drawable.ic_settings, R.string.nav_prefs, "Settings")
|
||||
}
|
||||
|
||||
// UI 设置: 默认页面顺序(与 MainScreen navItems 一致)
|
||||
val defaultScreenOrder = listOf("Satellites", "Passes", "Radar", "Mutual", "Roaming", "Map", "Settings")
|
||||
|
||||
@Serializable
|
||||
data object RadarDestination : NavKey
|
||||
|
||||
|
||||
@@ -0,0 +1,10 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M11,18c0,1.1 -0.9,2 -2,2s-2,-0.9 -2,-2 0.9,-2 2,-2 2,0.9 2,2zM9,10c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM9,4c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM15,8c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM15,10c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2zM15,16c-1.1,0 -2,0.9 -2,2s0.9,2 2,2 2,-0.9 2,-2 -0.9,-2 -2,-2z" />
|
||||
</vector>
|
||||
@@ -59,6 +59,7 @@
|
||||
\n\n* Ayarlar: "İçe aktar" düğmesi "Özel URL" olarak yeniden adlandırıldı - TLE/alıcı-verici kaynak URL\'leri doğrudan düzenlenebilir
|
||||
\n\n* Özel kaynak anahtarları varsayılan olarak KAPALI; eski örnek URL\'ler gerçek varsayılanlara sıfırlanır
|
||||
\n\n* Yeni UI Ayarları kartı: alt gezinme sayfalarını göster/gizle (sıra sabit, Ayarlar her zaman görünür)
|
||||
\n\n* Sayfa sırası: UI Ayarları'nda her sayfanın yanındaki tutamacı sürükleyerek alt gezinmeyi yeniden sıralayın, tek dokunuşla varsayılana sıfırlayın
|
||||
</string>
|
||||
|
||||
<!-- Radar screen -->
|
||||
@@ -186,6 +187,8 @@
|
||||
|
||||
<string name="prefs_other_title">Diğer ayarlar</string>
|
||||
<string name="prefs_ui_title">UI Ayarları</string>
|
||||
<string name="prefs_ui_order_title">Sayfa sırası</string>
|
||||
<string name="prefs_ui_order_reset">Sıralamayı sıfırla</string>
|
||||
<string name="prefs_other_switch_utc">Geçiş saatini UTC olarak göster</string>
|
||||
<string name="prefs_other_switch_update">Otomatik veri güncellemeyi etkinleştir</string>
|
||||
<string name="prefs_other_switch_sweep">Radar taramasını etkinleştir</string>
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
\n\n* 设置:导入文件按钮更名为自定义URL,可直接编辑 TLE/收发机数据源地址
|
||||
\n\n* 自定义数据源开关默认关闭;旧版占位 URL 自动重置为真实默认地址
|
||||
\n\n* 新增 UI设置 卡片:可显示/隐藏底部菜单栏页面(顺序固定,设置页始终显示)
|
||||
\n\n* 新增 页面顺序:在 UI设置 中拖动每页右侧抓手可调整底部菜单栏顺序,一键重置为默认顺序
|
||||
</string>
|
||||
|
||||
<!-- Radar screen -->
|
||||
@@ -169,6 +170,8 @@
|
||||
|
||||
<string name="prefs_other_title">其他设置</string>
|
||||
<string name="prefs_ui_title">UI设置</string>
|
||||
<string name="prefs_ui_order_title">页面顺序</string>
|
||||
<string name="prefs_ui_order_reset">重置顺序</string>
|
||||
<string name="prefs_other_switch_utc">以 UTC 时间显示</string>
|
||||
<string name="prefs_other_switch_update">启用卫星数据自动更新</string>
|
||||
<string name="prefs_other_switch_sweep">启用雷达扫描动画</string>
|
||||
|
||||
@@ -61,6 +61,7 @@
|
||||
\n\n* Settings: "Import" button renamed to "Custom URL" - edit TLE/transceiver source URLs directly
|
||||
\n\n* Custom source toggles default OFF; legacy placeholder URLs are reset to the real defaults
|
||||
\n\n* New UI Settings card: show/hide bottom navigation pages (order fixed, Settings always visible)
|
||||
\n\n* Page order: drag the handle next to each page in UI Settings to reorder the bottom navigation, one-tap reset to default
|
||||
</string>
|
||||
|
||||
<!-- Radar screen -->
|
||||
@@ -200,6 +201,8 @@
|
||||
|
||||
<string name="prefs_other_title">Other settings</string>
|
||||
<string name="prefs_ui_title">UI Settings</string>
|
||||
<string name="prefs_ui_order_title">Page order</string>
|
||||
<string name="prefs_ui_order_reset">Reset order</string>
|
||||
<string name="prefs_other_switch_utc">Show pass time in UTC</string>
|
||||
<string name="prefs_other_switch_update">Enable automatic data update</string>
|
||||
<string name="prefs_other_switch_sweep">Enable radar sweep animation</string>
|
||||
|
||||
Reference in new issue
Block a user