mirror of
https://github.com/atsunatsu/Look4Sat.git
synced 2026-10-02 03:15:37 +00:00
The roaming page was repeatedly rebuilt by hand and the red marker still rendered at the wrong spot on the user's device. Per the user's explicit instruction the whole page is now a faithful, line-by-line port of the reference app (QTH定位器 2.0, com.us1pm.gridsquarelocator) with zero UI or logic changes. UI (res/layout/main.xml, byte-verified via aapt2 dump): - 25dp holo-blue GPS bar: "GPS" 14sp, green/red status dot 15dp (original mipmaps copied as drawables), centered date, right time, translucent-yellow "设置启用GPS" button that opens location settings - Latitude/longitude rows: 16sp black labels, right-aligned decimal values, DMS label format "纬度 22° 18' 50" N" exactly as reference - 43sp bold black locator, centered, with progress spinner + notice - 3x3 continuous grid: 60/200/60dp columns, middle row fixed 205dp, edge cells #0BACF1, center cell 200x200dp holo-blue (#01DDFF as shown on the user's device), center label 100x80dp 30sp bold white (textColorHighlight) centered, bottom "制作:US1PM 汉化:BA7LCE" - Red marker: original pnt.png (red square with white outline), 10x10dp, absolutely positioned by the reference lookup tables (lon 3rd pair a..x -> leftMargin -2..190dp, lat 3rd pair a..x -> topMargin 190..-2dp, screen-Y inverted) Logic (MainActivity.java showLocation/checkEnabled/onResume): - 8-char locator via the reference range-lookup tables - 3x3 neighbor grid via parseInt3 five-branch logic incl. all four corner-carry tables (00/09/99/90) - Live GPS + network updates 10s/10m while the page is shown, provider filtered to gps/network, checkEnabled three-state (green dot / red dot + settings button) exactly like the reference - Time = cached hour prefix + fix minutes; date "dd MMM yyyy" Dropped only the Play-store ad banner (conflicts with GPL project). Verified: 11 unit tests pass (locator, marker lookup, grid, DMS, time, all edge branches); feature + app modules compile. RoamingState.kt removed - state and math now live in RoamingScreen.kt.