preferences changed

This commit is contained in:
serso 2011-09-28 22:53:50 +04:00
parent d86d8c657b
commit d5170da0e8
4 changed files with 11 additions and 6 deletions

View File

@ -28,4 +28,7 @@
<string name="c_redo">redo</string> <string name="c_redo">redo</string>
<string name="c_clear">clear</string> <string name="c_clear">clear</string>
<string name="c_paste">paste</string> <string name="c_paste">paste</string>
<string name="c_calc_color_display_title">Color expressions</string>
<string name="p_calc_result_precision_title">Precision of result</string>
</resources> </resources>

View File

@ -6,16 +6,16 @@
<org.solovyev.android.view.prefs.NumberPickerDialogPreference <org.solovyev.android.view.prefs.NumberPickerDialogPreference
a:key="@string/p_calc_result_precision_key" a:key="@string/p_calc_result_precision_key"
a:title="Precision of result value" a:title="@string/p_calc_result_precision_title"
a:defaultValue="5" a:defaultValue="5"
range:boundaries="0;10"/> range:boundaries="0;10"/>
<android.preference.CheckBoxPreference <android.preference.CheckBoxPreference
a:key="@string/p_calc_color_display_key" a:key="@string/p_calc_color_display_key"
a:title="Highlight expressions in brackets" a:title="@string/c_calc_color_display_title"
a:defaultValue="true"/> a:defaultValue="true"/>
<org.solovyev.android.view.prefs.FloatRangeSeekBarPreference <!-- <org.solovyev.android.view.prefs.FloatRangeSeekBarPreference
a:key="@string/p_drag_distance_key" a:key="@string/p_drag_distance_key"
a:title="Distance of drag event" a:title="Distance of drag event"
a:text=" pxs" a:text=" pxs"
@ -37,7 +37,7 @@
a:text=" degrees" a:text=" degrees"
a:defaultValue="0;45" a:defaultValue="0;45"
range:steps="5" range:steps="5"
range:boundaries="0;45"/> range:boundaries="0;45"/>-->
</PreferenceCategory> </PreferenceCategory>

View File

@ -248,5 +248,7 @@ public class CalculatorActivity extends Activity implements FontSizeAdjuster, Sh
final Boolean colorExpressionsInBracketsDefault = new BooleanMapper().parseValue(this.getString(R.string.p_calc_color_display)); final Boolean colorExpressionsInBracketsDefault = new BooleanMapper().parseValue(this.getString(R.string.p_calc_color_display));
assert colorExpressionsInBracketsDefault != null; assert colorExpressionsInBracketsDefault != null;
this.calculatorView.getEditor().setHighlightExpressionInBrackets(sharedPreferences.getBoolean(this.getString(R.string.p_calc_color_display_key), colorExpressionsInBracketsDefault)); this.calculatorView.getEditor().setHighlightExpressionInBrackets(sharedPreferences.getBoolean(this.getString(R.string.p_calc_color_display_key), colorExpressionsInBracketsDefault));
this.calculatorView.evaluate();
} }
} }

View File

@ -100,9 +100,9 @@ public abstract class AbstractDialogPreference<T> extends DialogPreference {
final LinearLayout.LayoutParams params = getParams(); final LinearLayout.LayoutParams params = getParams();
if (params != null) { if (params != null) {
result.addView(v);
} else {
result.addView(v, params); result.addView(v, params);
} else {
result.addView(v);
} }
return result; return result;