readjusted the arrow keys spacing to prevent accidental pressing of Backspace or Settings
This commit is contained in:
parent
026b81fc41
commit
857c7a085d
7 changed files with 48 additions and 35 deletions
|
|
@ -164,8 +164,10 @@ class MainLayoutNumpad extends BaseMainLayout {
|
|||
if (height <= 0 || forceRecalculate) {
|
||||
Resources resources = tt9.getResources();
|
||||
height = getKeyHeightCompat() * 4
|
||||
+ Math.round(resources.getDimension(R.dimen.numpad_status_bar_spacing_top))
|
||||
+ resources.getDimensionPixelSize(R.dimen.numpad_status_bar_spacing_bottom)
|
||||
+ resources.getDimensionPixelSize(R.dimen.numpad_suggestion_height)
|
||||
+ Math.round(resources.getDimension(R.dimen.numpad_spacing_bottom))
|
||||
+ Math.round(resources.getDimension(R.dimen.numpad_keys_spacing_bottom))
|
||||
+ getBottomInsetSize();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,28 +5,28 @@
|
|||
|
||||
<RelativeLayout style="@style/TTheme.Numpad.Key.Overlay.Wrapper">
|
||||
<io.github.sspanak.tt9.ui.main.keys.SoftKeySettings
|
||||
style="@style/TTheme.Numpad.Key"
|
||||
style="@style/TTheme.Numpad.Key.Large"
|
||||
android:id="@+id/soft_key_settings" />
|
||||
<include layout="@layout/key_overlay_settings" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout style="@style/TTheme.Numpad.Key.Overlay.Wrapper">
|
||||
<io.github.sspanak.tt9.ui.main.keys.SoftKeyAddWord
|
||||
style="@style/TTheme.Numpad.Key"
|
||||
style="@style/TTheme.Numpad.Key.Large"
|
||||
android:id="@+id/soft_key_add_word" />
|
||||
<include layout="@layout/key_overlay_icons" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout style="@style/TTheme.Numpad.Key.Overlay.Wrapper">
|
||||
<io.github.sspanak.tt9.ui.main.keys.SoftKeyShift
|
||||
style="@style/TTheme.Numpad.Key"
|
||||
style="@style/TTheme.Numpad.Key.Large"
|
||||
android:id="@+id/soft_key_shift" />
|
||||
<include layout="@layout/key_overlay_icons" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout style="@style/TTheme.Numpad.Key.Overlay.Wrapper">
|
||||
<io.github.sspanak.tt9.ui.main.keys.SoftKeyLF4
|
||||
style="@style/TTheme.Numpad.Key"
|
||||
style="@style/TTheme.Numpad.Key.Large"
|
||||
android:id="@+id/soft_key_lf4" />
|
||||
<include layout="@layout/key_overlay_icons" />
|
||||
</RelativeLayout>
|
||||
|
|
|
|||
|
|
@ -5,19 +5,19 @@
|
|||
style="@style/TTheme.Numpad.Column.Fn">
|
||||
|
||||
<io.github.sspanak.tt9.ui.main.keys.SoftKeyBackspace
|
||||
style="@style/TTheme.Numpad.Key"
|
||||
style="@style/TTheme.Numpad.Key.Large"
|
||||
android:id="@+id/soft_key_numpad_backspace" />
|
||||
|
||||
<RelativeLayout style="@style/TTheme.Numpad.Key.Overlay.Wrapper">
|
||||
<io.github.sspanak.tt9.ui.main.keys.SoftKeyFilter
|
||||
style="@style/TTheme.Numpad.Key"
|
||||
style="@style/TTheme.Numpad.Key.Large"
|
||||
android:id="@+id/soft_key_filter" />
|
||||
<include layout="@layout/key_overlay_icons" />
|
||||
</RelativeLayout>
|
||||
|
||||
<RelativeLayout style="@style/TTheme.Numpad.Key.Overlay.Wrapper">
|
||||
<io.github.sspanak.tt9.ui.main.keys.SoftKeyRF3
|
||||
style="@style/TTheme.Numpad.Key"
|
||||
style="@style/TTheme.Numpad.Key.Large"
|
||||
android:id="@+id/soft_key_rf3" />
|
||||
<include layout="@layout/key_overlay_icons" />
|
||||
</RelativeLayout>
|
||||
|
|
|
|||
|
|
@ -1,8 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:id="@+id/status_bar_container"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content">
|
||||
style="@style/TTheme.Numpad.TopBar"
|
||||
android:id="@+id/status_bar_container">
|
||||
|
||||
<io.github.sspanak.tt9.ui.main.keys.SoftKeyArrow
|
||||
style="@style/TTheme.Numpad.Key.Arrow"
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
<include layout="@layout/key_overlay_icons" />
|
||||
</RelativeLayout>
|
||||
|
||||
<View style="@style/TTheme.Numpad.Key.Placeholder" />
|
||||
<View style="@style/TTheme.Numpad.Key.Large.Placeholder" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
|
|
@ -103,7 +103,7 @@
|
|||
<include layout="@layout/key_overlay_icons" />
|
||||
</RelativeLayout>
|
||||
|
||||
<View style="@style/TTheme.Numpad.Key.Placeholder" />
|
||||
<View style="@style/TTheme.Numpad.Key.Large.Placeholder" />
|
||||
|
||||
</LinearLayout>
|
||||
</merge>
|
||||
|
|
|
|||
|
|
@ -38,7 +38,9 @@
|
|||
|
||||
<!-- Numpad -->
|
||||
<dimen name="numpad_max_width">9999dp</dimen>
|
||||
<dimen name="numpad_spacing_bottom">6dp</dimen>
|
||||
<dimen name="numpad_status_bar_spacing_top">0dp</dimen>
|
||||
<dimen name="numpad_status_bar_spacing_bottom">2dp</dimen>
|
||||
<dimen name="numpad_keys_spacing_bottom">6dp</dimen>
|
||||
|
||||
<dimen name="numpad_key_height">56dp</dimen>
|
||||
<dimen name="numpad_key_spacing">3dp</dimen>
|
||||
|
|
|
|||
|
|
@ -77,7 +77,6 @@
|
|||
<item name="android:textSize">@dimen/main_small_suggestion_text_size</item>
|
||||
</style>
|
||||
|
||||
|
||||
<!--*******************************************
|
||||
Small Keys
|
||||
*******************************************-->
|
||||
|
|
@ -164,7 +163,7 @@
|
|||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:layout_width">0dp</item>
|
||||
<item name="android:orientation">vertical</item>
|
||||
<item name="android:paddingBottom">@dimen/numpad_spacing_bottom</item>
|
||||
<item name="android:paddingBottom">@dimen/numpad_keys_spacing_bottom</item>
|
||||
</style>
|
||||
|
||||
|
||||
|
|
@ -172,12 +171,23 @@
|
|||
Numpad Status Bar
|
||||
*******************************************-->
|
||||
|
||||
<style name="TTheme.Numpad.StatusBar.Wrapper" parent="">
|
||||
<!-- Status Bar + Arrows. The Arrow keys themselves are under the "Numpad.Key." section -->
|
||||
<style name="TTheme.Numpad.TopBar" parent="">
|
||||
<item name="android:gravity">center_horizontal</item>
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">@dimen/numpad_suggestion_height</item>
|
||||
<item name="android:layout_width">0dp</item>
|
||||
<item name="android:layout_weight">1</item>
|
||||
<item name="android:layout_marginTop">@dimen/numpad_status_bar_spacing_top</item>
|
||||
<item name="android:layout_marginBottom">@dimen/numpad_status_bar_spacing_bottom</item>
|
||||
</style>
|
||||
|
||||
<!-- status + suggestions container -->
|
||||
<style name="TTheme.Numpad.StatusBar.Wrapper" parent="">
|
||||
<item name="android:layout_height">match_parent</item>
|
||||
<item name="android:layout_width">0dp</item>
|
||||
<item name="android:layout_weight">1</item>"
|
||||
</style>
|
||||
|
||||
<!-- one suggestion -->
|
||||
<style name="TTheme.Numpad.StatusBar.SuggestionList.Item" parent="">
|
||||
<item name="android:gravity">center</item>
|
||||
<item name="android:layout_width">wrap_content</item>
|
||||
|
|
@ -293,18 +303,14 @@
|
|||
Numpad Keys
|
||||
*******************************************-->
|
||||
<style name="TTheme.Numpad.Key.VersionStyle" parent="TTheme.Keyboard.Key.VersionStyle" />
|
||||
<style name="TTheme.Numpad.Key" parent="TTheme.Numpad.Key.VersionStyle">
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_height">@dimen/numpad_key_height</item>
|
||||
|
||||
<!-- reset the spacing and apply our own -->
|
||||
<item name="android:insetTop">@dimen/numpad_key_spacing</item>
|
||||
<item name="android:insetBottom">@dimen/numpad_key_spacing</item>
|
||||
<!-- Suggestion arrow keys -->
|
||||
<style name="TTheme.Numpad.Key.Arrow" parent="TTheme.Numpad.Key.VersionStyle">
|
||||
<item name="android:layout_height">match_parent</item>
|
||||
<item name="android:layout_width">@dimen/numpad_key_arrow_width</item>
|
||||
<item name="android:layout_marginLeft">@dimen/numpad_key_spacing</item>
|
||||
<item name="android:layout_marginRight">@dimen/numpad_key_spacing</item>
|
||||
<item name="android:padding">0dp</item>
|
||||
|
||||
<item name="android:textAppearance">@style/TextAppearance.AppCompat.Medium</item>
|
||||
<item name="android:textSize">@dimen/key_text_size</item>
|
||||
|
||||
<item name="android:textColor">@color/key_fn_text</item>
|
||||
|
|
@ -312,26 +318,30 @@
|
|||
<item name="rippleColor">@color/key_fn_ripple</item>
|
||||
</style>
|
||||
|
||||
<!-- Suggestion arrow keys -->
|
||||
<style name="TTheme.Numpad.Key.Arrow" parent="TTheme.Numpad.Key">
|
||||
<item name="android:layout_height">match_parent</item>
|
||||
<item name="android:layout_width">@dimen/numpad_key_arrow_width</item>
|
||||
<!-- Keypad keys -->
|
||||
<style name="TTheme.Numpad.Key.Large" parent="TTheme.Numpad.Key.Arrow">
|
||||
<item name="android:layout_height">@dimen/numpad_key_height</item>
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
|
||||
<!-- reset the spacing and apply our own -->
|
||||
<item name="android:insetTop">@dimen/numpad_key_spacing</item>
|
||||
<item name="android:insetBottom">@dimen/numpad_key_spacing</item>
|
||||
</style>
|
||||
|
||||
<!-- Keypad keys -->
|
||||
<style name="TTheme.Numpad.Key.Number" parent="TTheme.Numpad.Key">
|
||||
|
||||
<style name="TTheme.Numpad.Key.Number" parent="TTheme.Numpad.Key.Large">
|
||||
<item name="android:textColor">@color/key_num_text</item>
|
||||
<item name="backgroundTint">@color/key_num_background</item>
|
||||
<item name="rippleColor">@color/key_num_ripple</item>
|
||||
</style>
|
||||
|
||||
<style name="TTheme.Numpad.Key.OK" parent="TTheme.Numpad.Key">
|
||||
<style name="TTheme.Numpad.Key.OK" parent="TTheme.Numpad.Key.Large">
|
||||
<item name="android:textColor">@color/key_ok_text</item>
|
||||
<item name="backgroundTint">@color/key_ok_background</item>
|
||||
<item name="rippleColor">@color/key_ok_ripple</item>
|
||||
</style>
|
||||
|
||||
<style name="TTheme.Numpad.Key.Placeholder">
|
||||
<style name="TTheme.Numpad.Key.Large.Placeholder">
|
||||
<item name="android:layout_height">@dimen/numpad_key_height</item>
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:layout_margin">@dimen/numpad_key_spacing</item>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue