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 }}">