Highlighted buttons
This commit is contained in:
parent
ec73ad8d19
commit
6aa5ea4d0c
@ -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>
|
@ -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>
|
39
app/src/main/res/drawable/material_blue_button_lighter.xml
Normal file
39
app/src/main/res/drawable/material_blue_button_lighter.xml
Normal 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>
|
35
app/src/main/res/drawable/material_button_dark_lighter.xml
Normal file
35
app/src/main/res/drawable/material_button_dark_lighter.xml
Normal 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>
|
@ -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"/>
|
@ -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" />
|
@ -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"
|
||||||
|
@ -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" />
|
||||||
|
@ -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>
|
||||||
|
@ -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>
|
Loading…
Reference in New Issue
Block a user