refactor
This commit is contained in:
parent
f996d3a954
commit
8e841232cf
@ -17,40 +17,6 @@
|
|||||||
<item name="android:layout_marginBottom">1dp</item>
|
<item name="android:layout_marginBottom">1dp</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="default_digit_button_style" parent="button_style">
|
|
||||||
<item name="android:background">@drawable/default_button</item>
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<style name="violet_digit_button_style" parent="button_style">
|
|
||||||
<item name="android:background">@drawable/violet_button</item>
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<style name="light_blue_digit_button_style" parent="button_style">
|
|
||||||
<item name="android:background">@drawable/blue_button</item>
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<style name="default_control_button_style" parent="button_style"/>
|
|
||||||
|
|
||||||
<style name="violet_control_button_style" parent="button_style">
|
|
||||||
<item name="android:background">@drawable/violet_button_dark</item>
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<style name="light_blue_control_button_style" parent="button_style">
|
|
||||||
<item name="android:background">@drawable/blue_button_dark</item>
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<style name="default_control_image_button_style" parent="default_control_button_style">
|
|
||||||
<item name="android:padding">6dp</item>
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<style name="violet_control_image_button_style" parent="violet_control_button_style">
|
|
||||||
<item name="android:padding">6dp</item>
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<style name="light_blue_control_image_button_style" parent="light_blue_control_button_style">
|
|
||||||
<item name="android:padding">6dp</item>
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<style name="editor_style" parent="editor_style_parent">
|
<style name="editor_style" parent="editor_style_parent">
|
||||||
<item name="android:gravity">left|top</item>
|
<item name="android:gravity">left|top</item>
|
||||||
<item name="android:layout_width">fill_parent</item>
|
<item name="android:layout_width">fill_parent</item>
|
||||||
@ -69,24 +35,6 @@
|
|||||||
<item name="android:layout_height">fill_parent</item>
|
<item name="android:layout_height">fill_parent</item>
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="default_theme">
|
|
||||||
<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>
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<style name="violet_theme">
|
|
||||||
<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>
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<style name="light_blue_theme">
|
|
||||||
<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>
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<style name="default_text">
|
<style name="default_text">
|
||||||
<item name="android:background">@color/default_background</item>
|
<item name="android:background">@color/default_background</item>
|
||||||
<item name="android:textColor">@color/default_text_color</item>
|
<item name="android:textColor">@color/default_text_color</item>
|
||||||
|
24
res/values/styles-default-theme.xml
Normal file
24
res/values/styles-default-theme.xml
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
~ Copyright (c) 2009-2011. Created by serso aka se.solovyev.
|
||||||
|
~ For more information, please, contact se.solovyev@gmail.com
|
||||||
|
~ or visit http://se.solovyev.org
|
||||||
|
-->
|
||||||
|
|
||||||
|
<resources>
|
||||||
|
<style name="default_digit_button_style" parent="button_style">
|
||||||
|
<item name="android:background">@drawable/default_button</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="default_control_button_style" parent="button_style"/>
|
||||||
|
|
||||||
|
<style name="default_control_image_button_style" parent="default_control_button_style">
|
||||||
|
<item name="android:padding">6dp</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="default_theme">
|
||||||
|
<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>
|
||||||
|
</style>
|
||||||
|
</resources>
|
28
res/values/styles-light-blue-theme.xml
Normal file
28
res/values/styles-light-blue-theme.xml
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
~ Copyright (c) 2009-2011. Created by serso aka se.solovyev.
|
||||||
|
~ For more information, please, contact se.solovyev@gmail.com
|
||||||
|
~ or visit http://se.solovyev.org
|
||||||
|
-->
|
||||||
|
|
||||||
|
<resources>
|
||||||
|
|
||||||
|
<style name="light_blue_digit_button_style" parent="button_style">
|
||||||
|
<item name="android:background">@drawable/blue_button</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="light_blue_control_button_style" parent="button_style">
|
||||||
|
<item name="android:background">@drawable/blue_button_dark</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="light_blue_control_image_button_style" parent="light_blue_control_button_style">
|
||||||
|
<item name="android:padding">6dp</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="light_blue_theme">
|
||||||
|
<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>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
</resources>
|
26
res/values/styles-violet-theme.xml
Normal file
26
res/values/styles-violet-theme.xml
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<!--
|
||||||
|
~ Copyright (c) 2009-2011. Created by serso aka se.solovyev.
|
||||||
|
~ For more information, please, contact se.solovyev@gmail.com
|
||||||
|
~ or visit http://se.solovyev.org
|
||||||
|
-->
|
||||||
|
|
||||||
|
<resources>
|
||||||
|
<style name="violet_digit_button_style" parent="button_style">
|
||||||
|
<item name="android:background">@drawable/violet_button</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="violet_control_button_style" parent="button_style">
|
||||||
|
<item name="android:background">@drawable/violet_button_dark</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="violet_control_image_button_style" parent="violet_control_button_style">
|
||||||
|
<item name="android:padding">6dp</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="violet_theme">
|
||||||
|
<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>
|
||||||
|
</style>
|
||||||
|
</resources>
|
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
<PreferenceCategory a:title="@string/c_prefs_calculations_category">
|
<PreferenceCategory a:title="@string/c_prefs_calculations_category">
|
||||||
|
|
||||||
<org.solovyev.android.view.prefs.AdViewPreference
|
<org.solovyev.android.ads.AdViewPreference
|
||||||
a:key="admob_01"
|
a:key="admob_01"
|
||||||
a:layout="@layout/admob_pref"/>
|
a:layout="@layout/admob_pref"/>
|
||||||
|
|
||||||
@ -22,7 +22,7 @@
|
|||||||
a:title="@string/c_calc_round_result_title"
|
a:title="@string/c_calc_round_result_title"
|
||||||
a:defaultValue="true"/>
|
a:defaultValue="true"/>
|
||||||
|
|
||||||
<org.solovyev.android.view.prefs.NumberPickerDialogPreference
|
<org.solovyev.android.prefs.NumberPickerDialogPreference
|
||||||
a:key="@string/p_calc_result_precision_key"
|
a:key="@string/p_calc_result_precision_key"
|
||||||
a:title="@string/p_calc_result_precision_title"
|
a:title="@string/p_calc_result_precision_title"
|
||||||
a:summary="@string/c_calc_result_precision_summary"
|
a:summary="@string/c_calc_result_precision_summary"
|
||||||
@ -58,7 +58,7 @@
|
|||||||
|
|
||||||
<PreferenceCategory a:title="@string/c_prefs_appearance_category">
|
<PreferenceCategory a:title="@string/c_prefs_appearance_category">
|
||||||
|
|
||||||
<org.solovyev.android.view.prefs.AdViewPreference
|
<org.solovyev.android.ads.AdViewPreference
|
||||||
a:key="admob_02"
|
a:key="admob_02"
|
||||||
a:layout="@layout/admob_pref"/>
|
a:layout="@layout/admob_pref"/>
|
||||||
|
|
||||||
@ -93,7 +93,7 @@
|
|||||||
a:entryValues="@array/p_layout_values"/>
|
a:entryValues="@array/p_layout_values"/>
|
||||||
|
|
||||||
|
|
||||||
<org.solovyev.android.view.prefs.FloatRangeSeekBarPreference
|
<org.solovyev.android.prefs.FloatRangeSeekBarPreference
|
||||||
a:key="@string/p_drag_distance_key"
|
a:key="@string/p_drag_distance_key"
|
||||||
a:title="@string/c_swipe_distance"
|
a:title="@string/c_swipe_distance"
|
||||||
a:summary="@string/c_swipe_distance_summary"
|
a:summary="@string/c_swipe_distance_summary"
|
@ -33,7 +33,7 @@ public class CalculatorPreferencesActivity extends PreferenceActivity implements
|
|||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
|
||||||
addPreferencesFromResource(R.xml.main_preferences);
|
addPreferencesFromResource(R.xml.preferences);
|
||||||
|
|
||||||
final Preference adFreePreference = findPreference(CalculatorApplication.AD_FREE_P_KEY);
|
final Preference adFreePreference = findPreference(CalculatorApplication.AD_FREE_P_KEY);
|
||||||
adFreePreference.setEnabled(false);
|
adFreePreference.setEnabled(false);
|
||||||
|
Loading…
Reference in New Issue
Block a user