Calculation fixable messages

This commit is contained in:
Sergey Solovyev
2012-11-17 21:58:48 +04:00
parent 44ed81a5ca
commit 1ab714b044
33 changed files with 571 additions and 65 deletions

View File

@@ -0,0 +1,34 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:a="http://schemas.android.com/apk/res/android"
a:layout_width="match_parent"
a:layout_height="match_parent"
style="?dialogStyle"
a:orientation="vertical">
<LinearLayout
a:id="@+id/calculation_messages_container"
a:layout_width="match_parent"
a:layout_height="wrap_content"
a:orientation="vertical"/>
<CheckBox
a:id="@+id/do_not_show_calculation_messages_checkbox"
a:text="@string/do_not_show_messages_in_session"
a:layout_width="match_parent"
a:layout_height="wrap_content"/>
<LinearLayout
a:layout_width="match_parent"
a:layout_height="wrap_content"
a:orientation="horizontal"
a:gravity="center">
<Button a:id="@+id/ok_button"
a:layout_width="wrap_content"
a:layout_height="wrap_content"
a:text="@string/ok"/>
</LinearLayout>
</LinearLayout>

View File

@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:a="http://schemas.android.com/apk/res/android"
a:layout_width="match_parent"
a:layout_height="wrap_content"
a:orientation="horizontal">
<TextView a:id="@+id/calculation_messages_text_view"
a:layout_width="0dp"
a:layout_height="wrap_content"
a:layout_weight="5"/>
<Button
a:id="@+id/fix_button"
a:layout_width="0dp"
a:layout_height="wrap_content"
a:layout_weight="1"
a:text="@string/fix" />
</LinearLayout>

View File

@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<attr name="dialogStyle" format="reference" />
<attr name="digitButtonStyle" format="reference" />
<attr name="controlButtonStyle" format="reference" />
<attr name="controlImageButtonStyle" format="reference" />

View File

@@ -247,5 +247,14 @@
<string name="function_param_not_empty">Function parameter should not be empty!</string>
<string name="function_removal_confirmation_question">Do you really want to delete \'%s\' function?</string>
<string name="empty_function_error">Unable to create empty function!</string>
<string name="do_not_show_messages_in_session">Do not show this message until next session</string>
<string name="calculation_messages_dialog_title">Calculation messages</string>
<string name="arithmetic_error_while_plot">Arithmetic error occurred while plotting: %s</string>
<string name="ok">OK</string>
<string name="p_show_calculation_messages_dialog_title">Show calculation messages in dialog</string>
<string name="p_show_calculation_messages_dialog_summary">If turned on if any message occurred while calculations
special dialog will be shown
</string>
<string name="fix">Fix</string>
</resources>

View File

@@ -10,6 +10,10 @@
<item name="android:background">@drawable/metro_button_dark</item>
</style>
<style name="default_dialog_style">
<item name="android:padding">6dp</item>
</style>
<style name="default_control_button_style" parent="keyboard_button_style"/>
<style name="default_operation_button_style" parent="default_digit_button_style">
@@ -125,6 +129,8 @@
<item name="fragmentLayoutStyle">@style/default_fragment_layout_style</item>
<item name="dialogStyle">@style/default_dialog_style</item>
<item name="paneStyle">@style/default_pane_style</item>
<item name="paneStyleTransparent">@style/default_pane_style_transparent</item>

View File

@@ -56,6 +56,11 @@
a:title="@string/p_calculations_calculate_on_fly_title"
a:summary="@string/p_calculations_calculate_on_fly_summary"/>
<android.preference.CheckBoxPreference
a:key="show_calculation_messages_dialog"
a:title="@string/p_show_calculation_messages_dialog_title"
a:summary="@string/p_show_calculation_messages_dialog_summary"/>
</PreferenceScreen>
</PreferenceScreen>