New theme: dark material
This commit is contained in:
parent
fa5aaf93bd
commit
56d6c0db76
@ -101,29 +101,22 @@ public final class Preferences {
|
||||
|
||||
public static enum Theme {
|
||||
|
||||
default_theme(ThemeType.other, R.style.cpp_gray_theme),
|
||||
violet_theme(ThemeType.other, R.style.cpp_violet_theme),
|
||||
light_blue_theme(ThemeType.other, R.style.cpp_light_blue_theme),
|
||||
metro_blue_theme(ThemeType.metro, R.style.cpp_metro_blue_theme),
|
||||
metro_purple_theme(ThemeType.metro, R.style.cpp_metro_purple_theme),
|
||||
metro_green_theme(ThemeType.metro, R.style.cpp_metro_green_theme);
|
||||
|
||||
@Nonnull
|
||||
private final ThemeType themeType;
|
||||
default_theme(R.style.cpp_gray_theme),
|
||||
violet_theme(R.style.cpp_violet_theme),
|
||||
light_blue_theme(R.style.cpp_light_blue_theme),
|
||||
metro_blue_theme(R.style.cpp_metro_blue_theme),
|
||||
metro_purple_theme(R.style.cpp_metro_purple_theme),
|
||||
metro_green_theme(R.style.cpp_metro_green_theme),
|
||||
material_theme(R.style.cpp_material_theme),
|
||||
;
|
||||
|
||||
@Nonnull
|
||||
private final Integer themeId;
|
||||
|
||||
Theme(@Nonnull ThemeType themeType, @Nonnull Integer themeId) {
|
||||
this.themeType = themeType;
|
||||
Theme(@Nonnull Integer themeId) {
|
||||
this.themeId = themeId;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
public ThemeType getThemeType() {
|
||||
return themeType;
|
||||
}
|
||||
|
||||
@Nonnull
|
||||
public Integer getThemeId() {
|
||||
return getThemeId(null);
|
||||
@ -137,12 +130,6 @@ public final class Preferences {
|
||||
return themeId;
|
||||
}
|
||||
}
|
||||
|
||||
public static enum ThemeType {
|
||||
metro,
|
||||
other
|
||||
}
|
||||
|
||||
public static enum Layout {
|
||||
main_calculator(R.layout.main_calculator, R.string.p_layout_calculator, true),
|
||||
main_calculator_mobile(R.layout.main_calculator_mobile, R.string.p_layout_calculator_mobile, false),
|
||||
|
@ -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="?attr/colorControlHighlight">
|
||||
<item>
|
||||
<shape>
|
||||
<solid a:color="@color/cpp_material_blue" />
|
||||
</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="?attr/colorControlHighlight">
|
||||
<item>
|
||||
<shape>
|
||||
<solid a:color="@color/cpp_metro_button" />
|
||||
</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="?attr/colorControlHighlight">
|
||||
<item>
|
||||
<shape>
|
||||
<solid a:color="@color/cpp_metro_button_light" />
|
||||
</shape>
|
||||
</item>
|
||||
</ripple>
|
55
android-app/src/main/res/values-v21/theme_material.xml
Normal file
55
android-app/src/main/res/values-v21/theme_material.xml
Normal file
@ -0,0 +1,55 @@
|
||||
<!--
|
||||
~ 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
|
||||
-->
|
||||
|
||||
<resources>
|
||||
|
||||
<style name="material_digit_button_style" parent="cpp_keyboard_button_style">
|
||||
<item name="android:background">@drawable/material_button_dark</item>
|
||||
</style>
|
||||
|
||||
<style name="material_control_button_style" parent="metro_digit_button_style">
|
||||
<item name="android:background">@drawable/material_button_dark</item>
|
||||
</style>
|
||||
|
||||
<style name="material_operation_button_style" parent="material_digit_button_style">
|
||||
<item name="android:background">@drawable/material_blue_button</item>
|
||||
</style>
|
||||
|
||||
<style name="material_control_image_button_style" parent="material_control_button_style">
|
||||
<item name="android:padding">6dp</item>
|
||||
</style>
|
||||
|
||||
<style name="cpp_material_theme" parent="cpp_metro_blue_theme">
|
||||
<item name="cpp_digit_button_style">@style/material_digit_button_style</item>
|
||||
<item name="cpp_control_button_style">@style/material_control_button_style</item>
|
||||
<item name="cpp_control_image_button_style">@style/material_control_image_button_style</item>
|
||||
<item name="cpp_operation_button_style">@style/material_operation_button_style</item>
|
||||
</style>
|
||||
|
||||
<style name="cpp_metro_blue_dialog_theme" parent="cpp_gray_dialog_theme">
|
||||
<item name="cpp_digit_button_style">@style/material_digit_button_style</item>
|
||||
<item name="cpp_control_button_style">@style/material_control_button_style</item>
|
||||
<item name="cpp_control_image_button_style">@style/material_control_image_button_style</item>
|
||||
<item name="cpp_operation_button_style">@style/material_operation_button_style</item>
|
||||
</style>
|
||||
|
||||
</resources>
|
@ -41,6 +41,7 @@
|
||||
<color name="cpp_metro_button">#212121</color>
|
||||
<color name="cpp_metro_button_light">#393939</color>
|
||||
<color name="cpp_metro_blue">#10648c</color>
|
||||
<color name="cpp_material_blue">#ff0d4663</color>
|
||||
<color name="cpp_metro_blue_dark">#ff092c39</color>
|
||||
<color name="cpp_metro_green">#088e3a</color>
|
||||
<color name="cpp_metro_purple">#651456</color>
|
||||
|
Loading…
Reference in New Issue
Block a user