metro theme

This commit is contained in:
Sergey Solovyev 2012-02-08 14:09:56 +04:00
parent c4a4e94a0f
commit 270e6a9534
12 changed files with 56 additions and 5 deletions

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:a="http://schemas.android.com/apk/res/android">
<item a:state_pressed="true"
a:drawable="@drawable/metro_button_pressed"/>
<item a:drawable="@drawable/metro_button_blue_shape"/>
</selector>

View File

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2007 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.
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient android:startColor="#10648c" android:endColor="#10648c"/>
<corners android:radius="1dp" />
</shape>

View File

@ -15,6 +15,6 @@
-->
<shape xmlns:android="http://schemas.android.com/apk/res/android">
<gradient android:startColor="#959595" android:endColor="#959595"/>
<gradient android:startColor="#1aa1e1" android:endColor="#1aa1e1"/>
<corners android:radius="1dp" />
</shape>

View File

@ -13,5 +13,5 @@
a:text="/"
c:textDown="√"
c:directionTextScale="0.5"
style="?digitButtonStyle"
style="?operationButtonStyle"
a:onClick="digitButtonClickHandler"/>

View File

@ -13,6 +13,6 @@
c:textUp="^"
c:textDown="^2"
c:textLeft="Π"
style="?digitButtonStyle"
style="?operationButtonStyle"
c:directionTextScale="0.5"
a:onClick="digitButtonClickHandler"/>

View File

@ -12,5 +12,5 @@
c:textUp="°"
c:textDown="E"
a:text="+"
style="?digitButtonStyle"
style="?operationButtonStyle"
a:onClick="digitButtonClickHandler"/>

View File

@ -11,5 +11,5 @@
c:textDown="∂,…"
a:text="-"
c:directionTextScale="0.5"
style="?digitButtonStyle"
style="?operationButtonStyle"
a:onClick="digitButtonClickHandler"/>

View File

@ -4,5 +4,6 @@
<attr name="digitButtonStyle" format="reference" />
<attr name="controlButtonStyle" format="reference" />
<attr name="controlImageButtonStyle" format="reference" />
<attr name="operationButtonStyle" format="reference" />
</resources>

View File

@ -12,6 +12,10 @@
<style name="default_control_button_style" parent="button_style"/>
<style name="default_operation_button_style" parent="default_digit_button_style">
<item name="android:textColor">@color/button_operator_text_color</item>
</style>
<style name="default_control_image_button_style" parent="default_control_button_style">
<item name="android:padding">6dp</item>
</style>
@ -20,5 +24,6 @@
<item name="digitButtonStyle">@style/default_digit_button_style</item>
<item name="controlButtonStyle">@style/default_control_button_style</item>
<item name="controlImageButtonStyle">@style/default_control_image_button_style</item>
<item name="operationButtonStyle">@style/default_operation_button_style</item>
</style>
</resources>

View File

@ -15,6 +15,10 @@
<item name="android:background">@drawable/blue_button_dark</item>
</style>
<style name="light_blue_operation_button_style" parent="light_blue_digit_button_style">
<item name="android:textColor">@color/button_operator_text_color</item>
</style>
<style name="light_blue_control_image_button_style" parent="light_blue_control_button_style">
<item name="android:padding">6dp</item>
</style>
@ -23,6 +27,7 @@
<item name="digitButtonStyle">@style/light_blue_digit_button_style</item>
<item name="controlButtonStyle">@style/light_blue_control_button_style</item>
<item name="controlImageButtonStyle">@style/light_blue_control_image_button_style</item>
<item name="operationButtonStyle">@style/light_blue_operation_button_style</item>
</style>
</resources>

View File

@ -10,6 +10,10 @@
<item name="android:background">@drawable/metro_button_light</item>
</style>
<style name="metro_operation_button_style" parent="metro_digit_button_style">
<item name="android:background">@drawable/metro_button_blue</item>
</style>
<style name="metro_control_image_button_style" parent="metro_control_button_style">
<item name="android:padding">6dp</item>
</style>
@ -18,6 +22,7 @@
<item name="digitButtonStyle">@style/metro_digit_button_style</item>
<item name="controlButtonStyle">@style/metro_control_button_style</item>
<item name="controlImageButtonStyle">@style/metro_control_image_button_style</item>
<item name="operationButtonStyle">@style/metro_operation_button_style</item>
</style>
</resources>

View File

@ -10,6 +10,10 @@
<item name="android:background">@drawable/violet_button</item>
</style>
<style name="violet_operation_button_style" parent="violet_digit_button_style">
<item name="android:textColor">@color/button_operator_text_color</item>
</style>
<style name="violet_control_button_style" parent="button_style">
<item name="android:background">@drawable/violet_button_dark</item>
</style>
@ -22,5 +26,6 @@
<item name="digitButtonStyle">@style/violet_digit_button_style</item>
<item name="controlButtonStyle">@style/violet_control_button_style</item>
<item name="controlImageButtonStyle">@style/violet_control_image_button_style</item>
<item name="operationButtonStyle">@style/violet_operation_button_style</item>
</style>
</resources>