mirror of
https://github.com/twinksoftware/Gearslip.git
synced 2026-11-11 00:12:24 +01:00
Release v0.0.03-pre: weather, template cards, media fallbacks, setup steps
- Weather from Open-Meteo with a place name, a forecast screen and a nav bar icon; a fresh location fix is requested when the last one is stale - Map controls are solid, one size, and fade out after four seconds; pinch to zoom works because every finger now reaches the app - Map templates draw their content in a floating card; toggle and radio rows show their state, the Back and Pan actions work, and details text and buttons are larger - Home player gains Lyrics and Minimise buttons; minimised, it lives in the nav bar - Media apps that hide their library show what they are and can still be controlled; apps that refuse Gearslip as a host say why - Debug mode switch, session report in the log, and log sharing as a file attachment - Launcher, phone apps, weather and calendar load at startup - Web app opens DuckDuckGo by default - Home screen lists the setup steps; the launcher marks apps tested and working
This commit is contained in:
1 parent
94f8f23a56
commit
a8b49a3672
42 files changed
+1899
-386
No files matched your search
@@ -76,6 +76,27 @@ class CarPreviewActivity : ComponentActivity() {
|
||||
GearslipLog.i("preview: wrote ${out.name}")
|
||||
step++
|
||||
}
|
||||
// A two-finger pinch: "cx,cy,startGap,endGap" in projected pixels, after "pinchAfter" ms.
|
||||
intent.getStringExtra("pinch")?.let { spec ->
|
||||
val (cx, cy, gap0, gap1) = spec.split(",").map { it.toFloat() }
|
||||
val pair = { gap: Float -> listOf(TouchPoint(3, cx - gap / 2, cy), TouchPoint(7, cx + gap / 2, cy)) }
|
||||
val after = intent.getIntExtra("pinchAfter", 9000).toLong()
|
||||
main.postDelayed({
|
||||
snap()
|
||||
p.dispatchTouch(MotionEvent.ACTION_DOWN, 0, listOf(pair(gap0)[0]))
|
||||
p.dispatchTouch(MotionEvent.ACTION_POINTER_DOWN, 1, pair(gap0))
|
||||
val steps = 14
|
||||
for (i in 1..steps) main.postDelayed({
|
||||
p.dispatchTouch(MotionEvent.ACTION_MOVE, 0, pair(gap0 + (gap1 - gap0) * i / steps))
|
||||
}, 40L * i)
|
||||
main.postDelayed({
|
||||
p.dispatchTouch(MotionEvent.ACTION_POINTER_UP, 1, pair(gap1))
|
||||
p.dispatchTouch(MotionEvent.ACTION_UP, 0, listOf(pair(gap1)[0]))
|
||||
}, 40L * (steps + 1))
|
||||
main.postDelayed({ snap() }, 40L * (steps + 1) + 2000)
|
||||
}, after)
|
||||
}
|
||||
|
||||
// Free-running mode: keep snapshotting on a timer so the display can be driven from
|
||||
// outside (adb `am start --display` / `input -d`) while the harness records it.
|
||||
val snaps = intent.getIntExtra("snaps", 0)
|
||||
@@ -89,8 +110,9 @@ class CarPreviewActivity : ComponentActivity() {
|
||||
snap()
|
||||
taps.forEachIndexed { i, (x, y) ->
|
||||
main.postDelayed({
|
||||
p.dispatchTouch(MotionEvent.ACTION_DOWN, x, y)
|
||||
main.postDelayed({ p.dispatchTouch(MotionEvent.ACTION_UP, x, y) }, 80)
|
||||
val point = listOf(TouchPoint(0, x, y))
|
||||
p.dispatchTouch(MotionEvent.ACTION_DOWN, 0, point)
|
||||
main.postDelayed({ p.dispatchTouch(MotionEvent.ACTION_UP, 0, point) }, 80)
|
||||
}, 2500L * (i + 1))
|
||||
main.postDelayed({ snap() }, 2500L * (i + 1) + 1500)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user