Highlighted buttons

This commit is contained in:
serso 2016-03-14 15:00:23 +01:00
parent ec73ad8d19
commit 6aa5ea4d0c
10 changed files with 161 additions and 7 deletions

View File

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright 2013 serso aka se.solovyev
~
~ 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.
~
~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ Contact details
~
~ Email: se.solovyev@gmail.com
~ Site: http://se.solovyev.org
-->
<ripple xmlns:a="http://schemas.android.com/apk/res/android"
a:color="@color/ripple_material_dark">
<item>
<shape>
<solid a:color="@color/cpp_material_blue_lighter" />
</shape>
</item>
</ripple>

View File

@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright 2013 serso aka se.solovyev
~
~ 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.
~
~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ Contact details
~
~ Email: se.solovyev@gmail.com
~ Site: http://se.solovyev.org
-->
<ripple xmlns:a="http://schemas.android.com/apk/res/android"
a:color="@color/ripple_material_dark">
<item>
<shape>
<solid a:color="@color/cpp_metro_button_lighter" />
</shape>
</item>
</ripple>

View File

@ -0,0 +1,39 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright 2013 serso aka se.solovyev
~
~ 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.
~
~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ Contact details
~
~ Email: se.solovyev@gmail.com
~ Site: http://se.solovyev.org
-->
<selector xmlns:a="http://schemas.android.com/apk/res/android">
<item a:state_pressed="true">
<shape>
<solid a:color="@color/cpp_material_blue_lighter_lighter" />
</shape>
</item>
<item>
<shape>
<solid a:color="@color/cpp_material_blue_lighter" />
</shape>
</item>
</selector>

View File

@ -0,0 +1,35 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
~ Copyright 2013 serso aka se.solovyev
~
~ 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.
~
~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~ Contact details
~
~ Email: se.solovyev@gmail.com
~ Site: http://se.solovyev.org
-->
<selector xmlns:a="http://schemas.android.com/apk/res/android">
<item a:drawable="@drawable/material_button_pressed" a:state_pressed="true" />
<item>
<shape>
<solid a:color="@color/cpp_metro_button_lighter" />
</shape>
</item>
</selector>

View File

@ -24,10 +24,9 @@
<org.solovyev.android.views.dragbutton.DirectionDragButton <org.solovyev.android.views.dragbutton.DirectionDragButton
a:id="@id/cpp_button_clear" a:id="@id/cpp_button_clear"
style="?attr/cpp_button_style_control" style="?attr/cpp_button_style_control_highlighted"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:a="http://schemas.android.com/apk/res/android" xmlns:a="http://schemas.android.com/apk/res/android"
a:background="@color/grey_850"
a:text="@string/c_clear" a:text="@string/c_clear"
app:directionTextUp="MC" app:directionTextUp="MC"
a:textStyle="bold"/> a:textStyle="bold"/>

View File

@ -25,6 +25,5 @@
<ImageButton <ImageButton
xmlns:a="http://schemas.android.com/apk/res/android" xmlns:a="http://schemas.android.com/apk/res/android"
a:id="@id/cpp_button_erase" a:id="@id/cpp_button_erase"
a:background="@color/cpp_material_light_darker" style="?attr/cpp_button_style_operation_highlighted"
style="?attr/cpp_button_style_control"
a:src="@drawable/ic_backspace_white_48dp" /> a:src="@drawable/ic_backspace_white_48dp" />

View File

@ -24,7 +24,7 @@
<org.solovyev.android.views.dragbutton.DirectionDragButton <org.solovyev.android.views.dragbutton.DirectionDragButton
a:id="@id/cpp_button_percent" a:id="@id/cpp_button_percent"
style="?attr/cpp_button_style_digit" style="?attr/cpp_button_style_control"
xmlns:a="http://schemas.android.com/apk/res/android" xmlns:a="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto" xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools" xmlns:tools="http://schemas.android.com/tools"

View File

@ -24,7 +24,9 @@
<attr name="cpp_button_style_digit" format="reference" /> <attr name="cpp_button_style_digit" format="reference" />
<attr name="cpp_button_style_control" format="reference" /> <attr name="cpp_button_style_control" format="reference" />
<attr name="cpp_button_style_control_highlighted" format="reference" />
<attr name="cpp_button_style_operation" format="reference" /> <attr name="cpp_button_style_operation" format="reference" />
<attr name="cpp_button_style_operation_highlighted" format="reference" />
<attr name="cpp_main_bg" format="reference" /> <attr name="cpp_main_bg" format="reference" />
<attr name="cpp_pane_bg" format="reference" /> <attr name="cpp_pane_bg" format="reference" />
<attr name="cpp_fab_bg" format="reference" /> <attr name="cpp_fab_bg" format="reference" />

View File

@ -37,10 +37,12 @@
<color name="cpp_wizard_button_pressed">#757575</color> <color name="cpp_wizard_button_pressed">#757575</color>
<color name="cpp_metro_button_dark">#ff000000</color> <color name="cpp_metro_button_dark">#ff000000</color>
<color name="cpp_metro_button">@color/grey_900</color> <color name="cpp_metro_button">@color/grey_900</color>
<color name="cpp_metro_button_lighter">@color/grey_850</color>
<color name="cpp_metro_button_light">@color/grey_800</color> <color name="cpp_metro_button_light">@color/grey_800</color>
<color name="cpp_metro_blue">#10648c</color> <color name="cpp_metro_blue">#10648c</color>
<color name="cpp_material_blue">#ff0d4663</color> <color name="cpp_material_blue">#0a4766</color>
<color name="cpp_material_blue_lighter">#ff0d668d</color> <color name="cpp_material_blue_lighter">#0d5980</color>
<color name="cpp_material_blue_lighter_lighter">#0f6b99</color>
<color name="cpp_material_light">#ff37b295</color> <color name="cpp_material_light">#ff37b295</color>
<color name="cpp_material_light_darker">#ff309e84</color> <color name="cpp_material_light_darker">#ff309e84</color>
<color name="cpp_material_light_disabled">#c1d2ef</color> <color name="cpp_material_light_disabled">#c1d2ef</color>

View File

@ -28,10 +28,18 @@
<style name="CppKeyboardButton.Material.Control" parent="CppKeyboardButton.Material.Digit" /> <style name="CppKeyboardButton.Material.Control" parent="CppKeyboardButton.Material.Digit" />
<style name="CppKeyboardButton.Material.Control.Highlighted" parent="CppKeyboardButton.Material.Digit" >
<item name="android:background">@drawable/material_button_dark_lighter</item>
</style>
<style name="CppKeyboardButton.Material.Operation" parent="CppKeyboardButton.Material.Digit"> <style name="CppKeyboardButton.Material.Operation" parent="CppKeyboardButton.Material.Digit">
<item name="android:background">@drawable/material_blue_button</item> <item name="android:background">@drawable/material_blue_button</item>
</style> </style>
<style name="CppKeyboardButton.Material.Operation.Highlighted" parent="CppKeyboardButton.Material.Digit">
<item name="android:background">@drawable/material_blue_button_lighter</item>
</style>
<style name="CppHeaderButton.Material" parent="CppKeyboardButton.Material.Control"> <style name="CppHeaderButton.Material" parent="CppKeyboardButton.Material.Control">
<item name="android:layout_width">30dp</item> <item name="android:layout_width">30dp</item>
<item name="android:layout_height">30dp</item> <item name="android:layout_height">30dp</item>
@ -59,19 +67,25 @@
<style name="Cpp.Theme.Material" parent="Cpp.Theme"> <style name="Cpp.Theme.Material" parent="Cpp.Theme">
<item name="cpp_button_style_digit">@style/CppKeyboardButton.Material.Digit</item> <item name="cpp_button_style_digit">@style/CppKeyboardButton.Material.Digit</item>
<item name="cpp_button_style_control">@style/CppKeyboardButton.Material.Digit</item> <item name="cpp_button_style_control">@style/CppKeyboardButton.Material.Digit</item>
<item name="cpp_button_style_control_highlighted">@style/CppKeyboardButton.Material.Control.Highlighted</item>
<item name="cpp_button_style_operation">@style/CppKeyboardButton.Material.Operation</item> <item name="cpp_button_style_operation">@style/CppKeyboardButton.Material.Operation</item>
<item name="cpp_button_style_operation_highlighted">@style/CppKeyboardButton.Material.Operation.Highlighted</item>
</style> </style>
<style name="Cpp.Theme.Material.Dialog" parent="Cpp.Theme.Dialog"> <style name="Cpp.Theme.Material.Dialog" parent="Cpp.Theme.Dialog">
<item name="cpp_button_style_digit">@style/CppKeyboardButton.Material.Digit</item> <item name="cpp_button_style_digit">@style/CppKeyboardButton.Material.Digit</item>
<item name="cpp_button_style_control">@style/CppKeyboardButton.Material.Digit</item> <item name="cpp_button_style_control">@style/CppKeyboardButton.Material.Digit</item>
<item name="cpp_button_style_control_highlighted">@style/CppKeyboardButton.Material.Control.Highlighted</item>
<item name="cpp_button_style_operation">@style/CppKeyboardButton.Material.Operation</item> <item name="cpp_button_style_operation">@style/CppKeyboardButton.Material.Operation</item>
<item name="cpp_button_style_operation_highlighted">@style/CppKeyboardButton.Material.Operation.Highlighted</item>
</style> </style>
<style name="Cpp.Theme.Material.Dialog.Alert" parent="Cpp.Theme.Dialog.Alert"> <style name="Cpp.Theme.Material.Dialog.Alert" parent="Cpp.Theme.Dialog.Alert">
<item name="cpp_button_style_digit">@style/CppKeyboardButton.Material.Digit</item> <item name="cpp_button_style_digit">@style/CppKeyboardButton.Material.Digit</item>
<item name="cpp_button_style_control">@style/CppKeyboardButton.Material.Digit</item> <item name="cpp_button_style_control">@style/CppKeyboardButton.Material.Digit</item>
<item name="cpp_button_style_control_highlighted">@style/CppKeyboardButton.Material.Control.Highlighted</item>
<item name="cpp_button_style_operation">@style/CppKeyboardButton.Material.Operation</item> <item name="cpp_button_style_operation">@style/CppKeyboardButton.Material.Operation</item>
<item name="cpp_button_style_operation_highlighted">@style/CppKeyboardButton.Material.Operation.Highlighted</item>
</style> </style>
</resources> </resources>