Skip to content

Commit

Permalink
Merge pull request #706 from BeeeWall/material-black
Browse files Browse the repository at this point in the history
Add Material Black theme
  • Loading branch information
klausw authored Jun 17, 2019
2 parents 63b1f5e + ebd00bf commit f99737d
Show file tree
Hide file tree
Showing 45 changed files with 189 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ public class KeyboardSwitcher implements
R.layout.input_material_dark,
R.layout.input_material_light,
R.layout.input_ics_darker,
R.layout.input_material_black,
};

// Tables which contains resource ids for each character theme color
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,28 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Action keys. -->
<item android:state_active="true" android:state_pressed="true"
android:drawable="@drawable/btn_keyboard_key_active_pressed_lxx_light" />
android:drawable="@drawable/btn_keyboard_key_active_pressed_material_black" />
<item android:state_active="true"
android:drawable="@drawable/btn_keyboard_key_active_lxx_light" />
android:drawable="@drawable/btn_keyboard_key_active_material_black" />

<!-- Toggle keys. Use checkable/checked state. -->
<item android:state_checkable="true" android:state_checked="true" android:state_pressed="true"
android:drawable="@drawable/btn_keyboard_key_pressed_on_lxx_light" />
android:drawable="@drawable/btn_keyboard_key_pressed_on_material_black" />
<item android:state_checkable="true" android:state_pressed="true"
android:drawable="@drawable/btn_keyboard_key_pressed_off_lxx_light" />
android:drawable="@drawable/btn_keyboard_key_pressed_off_material_black" />
<item android:state_checkable="true" android:state_checked="true"
android:drawable="@drawable/btn_keyboard_key_normal_on_lxx_light" />
android:drawable="@drawable/btn_keyboard_key_normal_on_material_black" />
<item android:state_checkable="true"
android:drawable="@drawable/btn_keyboard_key_normal_off_lxx_light" />
android:drawable="@drawable/btn_keyboard_key_normal_off_material_black" />

<!-- Empty background keys. -->
<item android:state_empty="true" android:state_pressed="true"
android:drawable="@color/key_background_pressed_lxx_light" />
android:drawable="@color/key_background_pressed_material_black" />
<item android:state_empty="true"
android:drawable="@android:color/transparent" />

<!-- Normal keys. -->
<item android:state_pressed="true"
android:drawable="@color/key_background_pressed_lxx_light" />
<item android:drawable="@color/key_background_lxx_light" />
android:drawable="@color/key_background_pressed_material_black" />
<item android:drawable="@color/key_background_material_black" />
</selector>
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,28 @@
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Action keys. -->
<item android:state_active="true" android:state_pressed="true"
android:drawable="@drawable/btn_keyboard_key_active_pressed_lxx_dark" />
android:drawable="@drawable/btn_keyboard_key_active_pressed_material_dark" />
<item android:state_active="true"
android:drawable="@drawable/btn_keyboard_key_active_lxx_dark" />
android:drawable="@drawable/btn_keyboard_key_active_material_dark" />

<!-- Toggle keys. Use checkable/checked state. -->
<item android:state_checkable="true" android:state_checked="true" android:state_pressed="true"
android:drawable="@drawable/btn_keyboard_key_pressed_on_lxx_dark" />
android:drawable="@drawable/btn_keyboard_key_pressed_on_material_dark" />
<item android:state_checkable="true" android:state_pressed="true"
android:drawable="@drawable/btn_keyboard_key_pressed_off_lxx_dark" />
android:drawable="@drawable/btn_keyboard_key_pressed_off_material_dark" />
<item android:state_checkable="true" android:state_checked="true"
android:drawable="@drawable/btn_keyboard_key_normal_on_lxx_dark" />
android:drawable="@drawable/btn_keyboard_key_normal_on_material_dark" />
<item android:state_checkable="true"
android:drawable="@drawable/btn_keyboard_key_normal_off_lxx_dark" />
android:drawable="@drawable/btn_keyboard_key_normal_off_material_dark" />

<!-- Empty background keys. -->
<item android:state_empty="true" android:state_pressed="true"
android:drawable="@color/key_background_pressed_lxx_dark" />
android:drawable="@color/key_background_pressed_material_dark" />
<item android:state_empty="true"
android:drawable="@android:color/transparent" />

<!-- Normal keys. -->
<item android:state_pressed="true"
android:drawable="@color/key_background_pressed_lxx_dark" />
<item android:drawable="@color/key_background_lxx_dark" />
android:drawable="@color/key_background_pressed_material_dark" />
<item android:drawable="@color/key_background_material_dark" />
</selector>
44 changes: 44 additions & 0 deletions app/src/main/res/drawable/btn_keyboard_key_material_light.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2014 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Action keys. -->
<item android:state_active="true" android:state_pressed="true"
android:drawable="@drawable/btn_keyboard_key_active_pressed_material_light" />
<item android:state_active="true"
android:drawable="@drawable/btn_keyboard_key_active_material_light" />

<!-- Toggle keys. Use checkable/checked state. -->
<item android:state_checkable="true" android:state_checked="true" android:state_pressed="true"
android:drawable="@drawable/btn_keyboard_key_pressed_on_material_light" />
<item android:state_checkable="true" android:state_pressed="true"
android:drawable="@drawable/btn_keyboard_key_pressed_off_material_light" />
<item android:state_checkable="true" android:state_checked="true"
android:drawable="@drawable/btn_keyboard_key_normal_on_material_light" />
<item android:state_checkable="true"
android:drawable="@drawable/btn_keyboard_key_normal_off_material_light" />

<!-- Empty background keys. -->
<item android:state_empty="true" android:state_pressed="true"
android:drawable="@color/key_background_pressed_material_light" />
<item android:state_empty="true"
android:drawable="@android:color/transparent" />

<!-- Normal keys. -->
<item android:state_pressed="true"
android:drawable="@color/key_background_pressed_material_light" />
<item android:drawable="@color/key_background_material_light" />
</selector>
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@

<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"
android:drawable="@drawable/btn_keyboard_key_popup_selected_lxx_light" />
android:drawable="@drawable/btn_keyboard_key_popup_selected_material_black" />
</selector>
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@

<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"
android:drawable="@drawable/btn_keyboard_key_popup_selected_lxx_dark" />
android:drawable="@drawable/btn_keyboard_key_popup_selected_material_dark" />
</selector>
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2014 The Android Open Source Project
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->

<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true"
android:drawable="@drawable/btn_keyboard_key_popup_selected_material_light" />
</selector>
35 changes: 35 additions & 0 deletions app/src/main/res/layout/input_material_black.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 2010, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->

<org.pocketworkstation.pckeyboard.LatinKeyboardView
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:latin="http://schemas.android.com/apk/res-auto"
android:id="@+id/LatinkeyboardBaseView"
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/keyboard_bottom_padding"
android:background="@drawable/keyboard_background_material_black"
latin:keyTextColor="@color/key_text_color_material_black"
latin:keyHintColor="@color/key_hint_letter_color_material_black"

latin:keyBackground="@drawable/btn_keyboard_key_material_black"
latin:popupLayout="@layout/input_popup_material_black"
/>
8 changes: 4 additions & 4 deletions app/src/main/res/layout/input_material_dark.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/keyboard_bottom_padding"
android:background="@drawable/keyboard_background_lxx_dark"
latin:keyTextColor="@color/key_text_color_lxx_dark"
latin:keyHintColor="@color/key_hint_letter_color_lxx_dark"
android:background="@drawable/keyboard_background_material_dark"
latin:keyTextColor="@color/key_text_color_material_dark"
latin:keyHintColor="@color/key_hint_letter_color_material_dark"

latin:keyBackground="@drawable/btn_keyboard_key_lxx_dark"
latin:keyBackground="@drawable/btn_keyboard_key_material_dark"
latin:popupLayout="@layout/input_popup_material_dark"
/>
8 changes: 4 additions & 4 deletions app/src/main/res/layout/input_material_light.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingBottom="@dimen/keyboard_bottom_padding"
android:background="@drawable/keyboard_background_lxx_light"
android:background="@drawable/keyboard_background_material_light"
latin:symbolColorScheme="black"
latin:invertSymbols="true"
latin:shadowRadius="0"
latin:shadowColor="#ff777777"
latin:keyTextColor="@color/key_text_color_lxx_light"
latin:keyHintColor="@color/key_hint_letter_color_lxx_light"
latin:keyTextColor="@color/key_text_color_material_light"
latin:keyHintColor="@color/key_hint_letter_color_material_light"

latin:keyBackground="@drawable/btn_keyboard_key_lxx_light"
latin:keyBackground="@drawable/btn_keyboard_key_material_light"
latin:popupLayout="@layout/input_popup_material_light"
/>
43 changes: 43 additions & 0 deletions app/src/main/res/layout/input_popup_material_black.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 2010, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:background="@drawable/keyboard_popup_panel_background"
android:paddingLeft="16dip"
android:paddingRight="16dip"
>
<org.pocketworkstation.pckeyboard.LatinKeyboardBaseView
xmlns:latin="http://schemas.android.com/apk/res-auto"
android:id="@+id/LatinKeyboardBaseView"
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/latinkeyboard_transparent"

latin:keyBackground="@drawable/btn_keyboard_key_popup_material_black"
latin:keyHysteresisDistance="0dip"
latin:verticalCorrection="@dimen/mini_keyboard_vertical_correction"
latin:keyPreviewLayout="@layout/null_layout"
latin:popupLayout="@layout/null_layout"
/>
</LinearLayout>
2 changes: 1 addition & 1 deletion app/src/main/res/layout/input_popup_material_dark.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
android:layout_height="wrap_content"
android:background="@color/latinkeyboard_transparent"

latin:keyBackground="@drawable/btn_keyboard_key_popup_lxx_dark"
latin:keyBackground="@drawable/btn_keyboard_key_popup_material_dark"
latin:keyHysteresisDistance="0dip"
latin:verticalCorrection="@dimen/mini_keyboard_vertical_correction"
latin:keyPreviewLayout="@layout/null_layout"
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/layout/input_popup_material_light.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
android:layout_height="wrap_content"
android:background="@color/latinkeyboard_transparent"

latin:keyBackground="@drawable/btn_keyboard_key_popup_lxx_light"
latin:keyBackground="@drawable/btn_keyboard_key_popup_material_light"
latin:keyHysteresisDistance="0dip"
latin:verticalCorrection="@dimen/mini_keyboard_vertical_correction"
latin:keyPreviewLayout="@layout/null_layout"
Expand Down
20 changes: 12 additions & 8 deletions app/src/main/res/values/colors.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,16 @@
<color name="latinkeyboard_key_color_black">#FF000000</color>

<!--Material Keyboard Colors-->
<color name="key_background_lxx_dark">#263238</color>
<color name="key_background_pressed_lxx_dark">#19FFFFFF</color>
<color name="key_text_color_lxx_dark">#CCFFFFFF</color>
<color name="key_hint_letter_color_lxx_dark">#80FFFFFF</color>
<color name="key_background_lxx_light">#ECEFF1</color>
<color name="key_background_pressed_lxx_light">#2637474F</color>
<color name="key_text_color_lxx_light">#000000</color>
<color name="key_hint_letter_color_lxx_light">#B337474F</color>
<color name="key_background_material_black">#000000</color>
<color name="key_background_pressed_material_black">#19FFFFFF</color>
<color name="key_text_color_material_black">#CCFFFFFF</color>
<color name="key_hint_letter_color_material_black">#80FFFFFF</color>
<color name="key_background_material_dark">#263238</color>
<color name="key_background_pressed_material_dark">#19FFFFFF</color>
<color name="key_text_color_material_dark">#CCFFFFFF</color>
<color name="key_hint_letter_color_material_dark">#80FFFFFF</color>
<color name="key_background_material_light">#ECEFF1</color>
<color name="key_background_pressed_material_light">#2637474F</color>
<color name="key_text_color_material_light">#000000</color>
<color name="key_hint_letter_color_material_light">#B337474F</color>
</resources>
5 changes: 4 additions & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -354,12 +354,14 @@
<string name="layout_ics_darker" translatable="false">Ice Cream Sandwich (dark hints)</string>
<string name="layout_trans" translatable="false">Transparent</string>
<string name="layout_trans_neon" translatable="false">Transparent (experimental)</string>
<string name="layout_material_black" translatable="false">Material Black</string>
<string name="layout_material_dark" translatable="false">Material Dark</string>
<string name="layout_material_light" translatable="false">Material Light</string>

<string-array name="keyboard_layout_modes" translatable="false">
<item>@string/layout_ics</item>
<item>@string/layout_ics_darker</item>
<item>@string/layout_material_black</item>
<item>@string/layout_material_dark</item>
<item>@string/layout_material_light</item>
<item>@string/layout_gingerbread</item>
Expand All @@ -376,8 +378,9 @@
<string-array name="keyboard_layout_modes_values" translatable="false">
<item>0</item>
<item>6</item>
<item>4</item>
<item>5</item>
<item>4</item>
<item>7</item>
<item>1</item>
<item>2</item>
<item>3</item>
Expand Down

0 comments on commit f99737d

Please sign in to comment.