diff --git a/App_Resources/Android/src/main/AndroidManifest.xml b/App_Resources/Android/src/main/AndroidManifest.xml
index 5074e8ea..98e2715e 100644
--- a/App_Resources/Android/src/main/AndroidManifest.xml
+++ b/App_Resources/Android/src/main/AndroidManifest.xml
@@ -77,6 +77,7 @@
android:name="com.tns.NativeScriptActivity"
android:label="@string/title_activity_kimera"
android:configChanges="keyboard|keyboardHidden|orientation|screenSize|smallestScreenSize|screenLayout|locale|uiMode"
+ android:windowSoftInputMode="adjustResize"
android:theme="@style/LaunchScreenTheme"
android:hardwareAccelerated="true"
android:launchMode="singleTask"
diff --git a/App_Resources/Android/src/main/res/drawable/ic_tab_mic.xml b/App_Resources/Android/src/main/res/drawable/ic_tab_mic.xml
new file mode 100644
index 00000000..3132c4ea
--- /dev/null
+++ b/App_Resources/Android/src/main/res/drawable/ic_tab_mic.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
diff --git a/app/app.css b/app/app.css
index 393b0ba7..46222d63 100644
--- a/app/app.css
+++ b/app/app.css
@@ -159,8 +159,58 @@ Button.-primary {
.remote-controls {
margin: 0 8 0 8;
}
-.display-controls {
- margin-bottom: 6;
+/* The Settings / Watch / Ring tab bar above the controls. */
+.controls-tab-bar {
+ margin-bottom: 8;
+}
+.tab-button {
+ font-size: 14;
+ padding: 8 0;
+ margin: 0 2;
+ border-radius: 6;
+ background-color: #e2e2e2;
+ color: #333333;
+}
+.tab-button-selected {
+ background-color: #424242;
+ color: #ffffff;
+}
+/* The wakeword button at the tab bar's right edge: icon-only, narrower than
+ * the tabs, and never in the selected state (it isn't a tab). It is a
+ * button-styled GridLayout (Buttons can't hold images), so it borrows the
+ * .tab-button look and adds the elevation MaterialButtons get for free. */
+.tab-mic-button {
+ width: 56;
+ /* The real MaterialButtons render 48dp tall inside a 60dp layout box (6dp
+ * insets top and bottom); the margins and explicit height reproduce that.
+ * The height also bounds the tile's measure, without which its star row
+ * would collapse to content and pin the icon to the top. */
+ height: 48;
+ margin: 6 2;
+ android-elevation: 2;
+}
+.tab-mic-icon {
+ height: 20;
+ tint-color: #333333;
+}
+.ns-dark .tab-mic-icon {
+ tint-color: #cccccc;
+}
+.ns-dark .tab-button {
+ background-color: #333333;
+ color: #cccccc;
+}
+.ns-dark .tab-button-selected {
+ background-color: #e2e2e2;
+ color: #222222;
+}
+/* Settings tab rows. */
+.settings-row {
+ margin-bottom: 8;
+}
+.settings-row-label {
+ font-size: 14;
+ margin-right: 10;
}
.mode-button {
font-size: 13;
@@ -214,20 +264,12 @@ Button.-primary {
margin: 2;
font-size: 14;
}
-.ring-row {
- margin-top: 4;
-}
-.ring-label {
- font-size: 12;
- color: #666666;
- margin: 0 6 0 4;
-}
-.ring-button {
- width: 44;
- height: 36;
- margin: 1;
+/* Ring tab: simulated R1 inputs. */
+.ring-pad-button {
+ margin: 3;
padding: 0;
- font-size: 13;
+ height: 52;
+ font-size: 14;
}
/*
* Pairing scan list (phone-ui/pairing-page). Rows are Repeater items: product
diff --git a/app/phone-ui/main-page.ts b/app/phone-ui/main-page.ts
index 8692bae2..4298a5e7 100644
--- a/app/phone-ui/main-page.ts
+++ b/app/phone-ui/main-page.ts
@@ -60,6 +60,15 @@ function applySettingsTextFieldContrast(textField: TextField): void {
nativeTextField.setSelectAllOnFocus(true)
}
+/**
+ * Leaving keyboard-input mode: the glasses navigated away from the text
+ * setting, so the phone's keyboard has nothing to type into any more.
+ */
+function dismissTextEditorKeyboard(page: Page): void {
+ page.getViewById('settingsTextField')?.dismissSoftInput()
+ page.getViewById('secondarySettingsTextField')?.dismissSoftInput()
+}
+
function focusTextEditor(page: Page): void {
setTimeout(() => {
const textField = page.getViewById('settingsTextField')
@@ -109,6 +118,8 @@ export function loaded(args: EventData) {
if (propertyArgs.propertyName === 'activeTextSettingId') {
if (model.isTextSettingEditorActive) {
focusTextEditor(page)
+ } else {
+ dismissTextEditorKeyboard(page)
}
}
},
diff --git a/app/phone-ui/main-page.xml b/app/phone-ui/main-page.xml
index bc2e8bd6..d9c873fe 100644
--- a/app/phone-ui/main-page.xml
+++ b/app/phone-ui/main-page.xml
@@ -29,10 +29,12 @@
visibility="{{ displayPreviewMessageVisibility }}">
-
-
-
-
+
+
+
+
+
@@ -56,7 +58,7 @@
-
+
@@ -84,13 +86,19 @@
+
+ verticalAlignment="bottom">
-
+
+
Phone display
- // (the settings themselves stay reachable through the Settings app).
+ // Three tabs: Settings (screen size + brightness), Watch (the simulated
+ // watch face), Ring (simulated R1 inputs). The whole area collapses while a
+ // text setting is being edited so the editor gets the space instead.
- get screenSizeControlVisibility(): "visible" | "collapse" {
- return showScreenSizeSetting.get() ? "visible" : "collapse";
+ private _controlsTab: ControlsTab = lastControlsTab;
+
+ get controlsVisibility(): "visible" | "collapse" {
+ return this.isTextSettingEditorActive ? "collapse" : "visible";
}
- get brightnessControlVisibility(): "visible" | "collapse" {
- return showBrightnessControlSetting.get() ? "visible" : "collapse";
+ get settingsTabVisibility(): "visible" | "collapse" {
+ return this._controlsTab === "settings" ? "visible" : "collapse";
}
- get displayControlsVisibility(): "visible" | "collapse" {
- return showScreenSizeSetting.get() || showBrightnessControlSetting.get() ? "visible" : "collapse";
+ get watchTabVisibility(): "visible" | "collapse" {
+ return this._controlsTab === "watch" ? "visible" : "collapse";
}
+ get ringTabVisibility(): "visible" | "collapse" {
+ return this._controlsTab === "ring" ? "visible" : "collapse";
+ }
+
+ get settingsTabClass(): string {
+ return this._controlsTab === "settings" ? "tab-button tab-button-selected" : "tab-button";
+ }
+
+ get watchTabClass(): string {
+ return this._controlsTab === "watch" ? "tab-button tab-button-selected" : "tab-button";
+ }
+
+ get ringTabClass(): string {
+ return this._controlsTab === "ring" ? "tab-button tab-button-selected" : "tab-button";
+ }
+
+ onSettingsTabTap(): void {
+ this.setControlsTab("settings");
+ }
+
+ onWatchTabTap(): void {
+ this.setControlsTab("watch");
+ }
+
+ onRingTabTap(): void {
+ this.setControlsTab("ring");
+ }
+
+ private setControlsTab(tab: ControlsTab): void {
+ if (this._controlsTab === tab) return;
+ this._controlsTab = tab;
+ // Remembered across navigations (module-level) so the page comes back on
+ // the tab it left on; deliberately not persisted to disk.
+ lastControlsTab = tab;
+ this.notifyPropertyChange("settingsTabVisibility", this.settingsTabVisibility);
+ this.notifyPropertyChange("watchTabVisibility", this.watchTabVisibility);
+ this.notifyPropertyChange("ringTabVisibility", this.ringTabVisibility);
+ this.notifyPropertyChange("settingsTabClass", this.settingsTabClass);
+ this.notifyPropertyChange("watchTabClass", this.watchTabClass);
+ this.notifyPropertyChange("ringTabClass", this.ringTabClass);
+ }
+
+ // ---- display mode and brightness, on the Settings tab ----
+
get displayModeLabel(): string {
return displayModeLabel(displayModeSetting.get()) + " ▾";
}
@@ -950,9 +1020,6 @@ export class MainViewModel extends Observable {
this.notifyPropertyChange("brightnessSliderEnabled", this.brightnessSliderEnabled);
this.notifyPropertyChange("brightnessPercent", this.brightnessPercent);
this.notifyPropertyChange("displayModeLabel", this.displayModeLabel);
- this.notifyPropertyChange("screenSizeControlVisibility", this.screenSizeControlVisibility);
- this.notifyPropertyChange("brightnessControlVisibility", this.brightnessControlVisibility);
- this.notifyPropertyChange("displayControlsVisibility", this.displayControlsVisibility);
}
private readLayoutOrientation(): LayoutOrientation {
diff --git a/app/phone-ui/remote-controls.xml b/app/phone-ui/remote-controls.xml
index b769e29e..99036282 100644
--- a/app/phone-ui/remote-controls.xml
+++ b/app/phone-ui/remote-controls.xml
@@ -1,47 +1,72 @@
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
diff --git a/app/ui/dashboard-settings.ts b/app/ui/dashboard-settings.ts
index 8b1d348b..55f1094f 100644
--- a/app/ui/dashboard-settings.ts
+++ b/app/ui/dashboard-settings.ts
@@ -308,22 +308,6 @@ export const mirrorTouchSetting = new ConfigSettingBoolean({
"Let touches on the phone's mirror act on the glasses UI: tap selects what it lands on, double-tap goes back, a hold opens the menu, swipes navigate.",
});
-export const showBrightnessControlSetting = new ConfigSettingBoolean({
- id: "show-brightness-control",
- label: "Show brightness control",
- storageKey: "phone.showBrightnessControl",
- defaultValue: false,
- description: "Show the brightness slider above the mirror on the phone's main screen.",
-});
-
-export const showScreenSizeSetting = new ConfigSettingBoolean({
- id: "show-screen-size",
- label: "Show screen size",
- storageKey: "phone.showScreenSize",
- defaultValue: false,
- description: "Show the screen-size (display mode) picker above the mirror on the phone's main screen.",
-});
-
// Wear OS watch remote (app/g2/wear-remote.ts, wear/). All three are read on
// every watch message, so a change applies immediately.
export const watchRemoteEnabledSetting = new ConfigSettingBoolean({
diff --git a/app/ui/dashboard/settings-menus.ts b/app/ui/dashboard/settings-menus.ts
index 2fc354d8..59988a2a 100644
--- a/app/ui/dashboard/settings-menus.ts
+++ b/app/ui/dashboard/settings-menus.ts
@@ -48,8 +48,6 @@ import {
firmwareDebugFlagsSetting,
lockScreenEnabledSetting,
saveVoiceRecordingsSetting,
- showBrightnessControlSetting,
- showScreenSizeSetting,
suspendEvenHubWhenScreenOffSetting,
terminalAutoReconnectSetting,
terminalLaunchPresetsSetting,
@@ -161,8 +159,6 @@ function settingsSections(): SettingsSection[] {
items: [
enumSettingMenuItem(previewColorSetting),
toggleSettingMenuItem(mirrorTouchSetting),
- toggleSettingMenuItem(showBrightnessControlSetting),
- toggleSettingMenuItem(showScreenSizeSetting),
],
},
{