updated the Small MainView to use the Material 2 theme
This commit is contained in:
parent
4b8ccdd2b1
commit
b28d4cb458
42 changed files with 358 additions and 571 deletions
|
|
@ -1,8 +1,28 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
What colors look good together: https://www.canva.com/colors/color-wheel/
|
||||
-->
|
||||
<resources>
|
||||
<!-- Light theme -->
|
||||
<color name="button_text">#242424</color>
|
||||
<color name="keyboard_background">#e8eaed</color>
|
||||
<color name="keyboard_text_color">#3d3d3f</color>
|
||||
|
||||
<color name="key_num_background">#fff</color>
|
||||
<color name="key_num_color">#333</color>
|
||||
<color name="key_num_alternative_color">#666</color> <!-- 'hold' functions -->
|
||||
|
||||
<color name="key_fn_background">#ccced5</color>
|
||||
<color name="key_fn_alternative_color">#888</color> <!-- 'hold' functions -->
|
||||
|
||||
<color name="key_ok_background">#1a73e8</color>
|
||||
<color name="key_ok_color">#fff</color>
|
||||
|
||||
<color name="suggestion_selected_background">#8ab5f6</color> <!-- 8ed0fe / 7ecbff / #FFB27E / 73c7ff / 7ecfe2 / 8ac8f1 -->
|
||||
<color name="suggestion_selected_color">#000</color>
|
||||
<color name="suggestion_separator">#888888</color>
|
||||
|
||||
<!-- legacy -->
|
||||
|
||||
<!-- Light theme -->
|
||||
<color name="candidate_background">#D3D3D3</color>
|
||||
<color name="candidate_color">#202020</color>
|
||||
<color name="candidate_selected">#B8B8B8</color>
|
||||
|
|
@ -12,8 +32,6 @@
|
|||
<color name="numpad_separator">#CCC</color>
|
||||
|
||||
<!-- Dark theme -->
|
||||
<color name="dark_button_text">#C0C0C0</color>
|
||||
|
||||
<color name="dark_candidate_background">#2C2C2C</color>
|
||||
<color name="dark_candidate_color">#CCCCCC</color>
|
||||
<color name="dark_candidate_selected">#555555</color>
|
||||
|
|
|
|||
|
|
@ -1,18 +1,23 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<dimen name="candidate_font_size">18sp</dimen>
|
||||
<dimen name="candidate_height">26sp</dimen>
|
||||
<dimen name="candidate_padding_horizontal">6sp</dimen>
|
||||
<dimen name="status_bar_height">26sp</dimen>
|
||||
<dimen name="status_bar_font_size">16sp</dimen>
|
||||
<dimen name="suggestion_font_size">18sp</dimen> <!-- for some reason the RecyclerView displays the text smaller than the TextView, so we to make the suggestions slightly bigger than the regular Status Bar text. -->
|
||||
<dimen name="suggestion_padding_horizontal">6sp</dimen>
|
||||
|
||||
<dimen name="main_small_key_icon_size">32sp</dimen>
|
||||
<dimen name="main_small_key_height">44dp</dimen>
|
||||
<dimen name="main_small_key_wrapper_height">46dp</dimen>
|
||||
|
||||
<dimen name="main_small_key_text_editing_height">65dp</dimen>
|
||||
|
||||
<!-- Preferences, default font size -->
|
||||
<dimen name="preferences_text_min_height">48dp</dimen>
|
||||
<dimen name="preference_search_height">72dp</dimen>
|
||||
<dimen name="pref_padding_horizontal">16dp</dimen>
|
||||
<dimen name="pref_padding_vertical">12dp</dimen>
|
||||
|
||||
<dimen name="soft_key_height">44dp</dimen>
|
||||
<dimen name="soft_key_icon_size">24sp</dimen>
|
||||
<dimen name="soft_key_drawable_bottom_padding">6dp</dimen>
|
||||
<dimen name="soft_key_drawable_title_size">12sp</dimen>
|
||||
|
||||
<!-- Large font size -->
|
||||
<!-- Preferences, large font size -->
|
||||
<dimen name="pref_large_category_padding_top">30dp</dimen>
|
||||
<dimen name="pref_large_category_padding_bottom">12dp</dimen>
|
||||
<dimen name="pref_large_padding_horizontal">16dp</dimen>
|
||||
|
|
@ -21,10 +26,6 @@
|
|||
<dimen name="pref_large_summary_size">19sp</dimen>
|
||||
|
||||
|
||||
<!-- Default font size -->
|
||||
<dimen name="pref_padding_horizontal">16dp</dimen>
|
||||
<dimen name="pref_padding_vertical">12dp</dimen>
|
||||
|
||||
<!-- Numpad -->
|
||||
<dimen name="numpad_max_width">10000dp</dimen>
|
||||
<dimen name="numpad_padding_bottom">6dp</dimen>
|
||||
|
|
@ -37,4 +38,7 @@
|
|||
<dimen name="numpad_candidate_font_size">17sp</dimen>
|
||||
<dimen name="numpad_candidate_height">40dp</dimen>
|
||||
<dimen name="numpad_candidate_min_width">36dp</dimen>
|
||||
|
||||
<dimen name="numpad_text_editing_font_size">17sp</dimen>
|
||||
<dimen name="soft_key_drawable_bottom_padding">6dp</dimen>
|
||||
</resources>
|
||||
|
|
|
|||
|
|
@ -1,7 +1,118 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="TTheme" parent="Theme.AppCompat.DayNight" />
|
||||
<style name="TTheme" parent="Theme.MaterialComponents.DayNight" />
|
||||
<style name="TTheme.Preferences" parent="Theme.AppCompat.DayNight" />
|
||||
|
||||
|
||||
<style name="TTheme.AddWord" parent="Theme.AppCompat.Dialog.Alert">
|
||||
<item name="windowNoTitle">true</item> <!-- hide some weird floating rectangle above the dialog -->
|
||||
</style>
|
||||
|
||||
|
||||
<style name="TTheme.Keyboard">
|
||||
<item name="android:background">@color/keyboard_background</item>
|
||||
</style>
|
||||
|
||||
|
||||
<!-- status bar -->
|
||||
<style name="TTheme.MainSmall.StatusBar.Wrapper" parent="">
|
||||
<item name="android:layout_height">@dimen/status_bar_height</item>
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
</style>
|
||||
|
||||
<style name="TTheme.MainSmall.StatusBar.Status" parent="">
|
||||
<item name="android:gravity">center</item>
|
||||
<item name="android:layout_height">match_parent</item>
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
|
||||
<item name="android:textSize">@dimen/status_bar_font_size</item>
|
||||
<item name="android:textStyle">italic</item>
|
||||
<item name="android:textColor">@color/keyboard_text_color</item>
|
||||
</style>
|
||||
|
||||
<style name="TTheme.MainSmall.StatusBar.SuggestionList" parent="">
|
||||
<item name="android:layout_gravity">center_vertical</item>
|
||||
<item name="android:layout_height">match_parent</item>
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:orientation">horizontal</item>
|
||||
<item name="android:scrollbars">none</item>
|
||||
</style>
|
||||
|
||||
<style name="TTheme.MainSmall.StatusBar.SuggestionList.Item" parent="">
|
||||
<item name="android:gravity">center</item>
|
||||
<item name="android:layout_width">wrap_content</item>
|
||||
<item name="android:layout_height">match_parent</item>
|
||||
<item name="android:paddingLeft">@dimen/suggestion_padding_horizontal</item>
|
||||
<item name="android:paddingRight">@dimen/suggestion_padding_horizontal</item>
|
||||
|
||||
<item name="android:textSize">@dimen/suggestion_font_size</item>
|
||||
</style>
|
||||
|
||||
|
||||
<!-- general purpose key style -->
|
||||
<style name="TTheme.Key" parent="Widget.MaterialComponents.Button">
|
||||
<item name="android:layout_width">0dp</item>
|
||||
<item name="android:layout_height">wrap_content</item>
|
||||
<item name="android:layout_weight">1</item>
|
||||
</style>
|
||||
|
||||
|
||||
<!-- Main Small view (backspace and OK) -->
|
||||
<style name="TTheme.MainSmall.Wrapper" parent="">
|
||||
<item name="android:baselineAligned">true</item>
|
||||
<item name="android:gravity">center</item>
|
||||
<item name="android:layout_height">@dimen/main_small_key_wrapper_height</item>
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:orientation">horizontal</item>
|
||||
</style>
|
||||
|
||||
<style name="TTheme.MainSmall.Key" parent="TTheme.Key">
|
||||
<item name="android:layout_height">match_parent</item>
|
||||
<item name="android:layout_marginLeft">6dp</item>
|
||||
<item name="android:layout_marginRight">6dp</item>
|
||||
<item name="android:layout_marginTop">1dp</item>
|
||||
<item name="android:layout_marginBottom">1dp</item>
|
||||
|
||||
<item name="android:paddingTop">0dp</item>
|
||||
<item name="android:paddingBottom">0dp</item>
|
||||
<item name="android:textAppearance">@style/TextAppearance.AppCompat.Medium</item>
|
||||
|
||||
<item name="android:textColor">@color/keyboard_text_color</item>
|
||||
<item name="backgroundTint">@color/key_num_background</item>
|
||||
</style>
|
||||
|
||||
<style name="TTheme.MainSmall.Key.OK" parent="TTheme.MainSmall.Key">
|
||||
<item name="android:textColor">@color/key_ok_color</item>
|
||||
<item name="backgroundTint">@color/key_ok_background</item>
|
||||
</style>
|
||||
|
||||
|
||||
<!-- Fn keys (command palette or text-editing palette) -->
|
||||
<style name="TTheme.CommandPalette.Wrapper" parent="">
|
||||
<item name="android:layout_height">@dimen/main_small_key_text_editing_height</item>
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
<item name="android:orientation">horizontal</item>
|
||||
</style>
|
||||
|
||||
<style name="TTheme.CommandPalette.Key" parent="TTheme.MainSmall.Key">
|
||||
<item name="android:drawablePadding">0dp</item>
|
||||
<item name="android:layout_marginTop">0dp</item>
|
||||
<item name="android:layout_marginBottom">0dp</item>
|
||||
<item name="android:layout_marginLeft">1dp</item>
|
||||
<item name="android:layout_marginRight">1dp</item>
|
||||
<item name="android:paddingTop">0dp</item>
|
||||
<item name="android:paddingBottom">2dp</item>
|
||||
<item name="android:paddingLeft">0dp</item>
|
||||
<item name="android:paddingRight">0dp</item>
|
||||
|
||||
<item name="android:textAppearance">@style/TextAppearance.AppCompat</item>
|
||||
<item name="android:textSize">@dimen/status_bar_font_size</item>
|
||||
<item name="drawableTint">@color/keyboard_text_color</item>
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
<!-- LEGACY -->
|
||||
<style name="hSeparator">
|
||||
<item name="android:layout_height">match_parent</item>
|
||||
<item name="android:layout_width">3dp</item>
|
||||
|
|
@ -20,9 +131,7 @@
|
|||
<item name="android:layout_marginRight">@dimen/numpad_row_separator_margin</item>
|
||||
<item name="android:layout_height">1dp</item>
|
||||
<item name="android:layout_width">match_parent</item>
|
||||
</style>
|
||||
|
||||
<style name="TTheme.AddWord" parent="Theme.AppCompat.DayNight.Dialog.Alert">
|
||||
<item name="windowNoTitle">true</item> <!-- hide some weird floating rectangle above the dialog -->
|
||||
<item name="android:background">@color/suggestion_separator</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue