This commit is contained in:
serso 2012-09-27 12:46:09 +04:00
parent 388c40d912
commit d41cf0659e
8 changed files with 218 additions and 194 deletions

View File

@ -34,7 +34,6 @@
a:layout_weight="1"/> a:layout_weight="1"/>
<LinearLayout a:id="@+id/displayContainer" <LinearLayout a:id="@+id/displayContainer"
a:layout_margin="@dimen/display_margin"
a:layout_weight="4" a:layout_weight="4"
a:layout_width="0dp" a:layout_width="0dp"
a:layout_height="match_parent"/> a:layout_height="match_parent"/>

View File

@ -0,0 +1,51 @@
<?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"
a:orientation="vertical">
<LinearLayout a:layout_weight="1"
a:layout_width="match_parent"
a:layout_height="0dp">
<include layout="@layout/calc_left_button"/>
<include layout="@layout/calc_vars_button"/>
<include layout="@layout/calc_copy_button"/>
<include layout="@layout/calc_six_digit_button"/>
<include layout="@layout/calc_seven_digit_button"/>
<include layout="@layout/calc_eight_digit_button"/>
<include layout="@layout/calc_nine_digit_button"/>
<include layout="@layout/calc_zero_digit_button"/>
<include layout="@layout/calc_multiplication_button"/>
<include layout="@layout/calc_division_button"/>
<include layout="@layout/calc_equals_button"/>
<include layout="@layout/calc_operators_button"/>
<include layout="@layout/calc_donate_button"/>
<include layout="@layout/calc_right_button"/>
</LinearLayout>
<LinearLayout a:layout_weight="1"
a:layout_width="match_parent"
a:layout_height="0dp">
<include layout="@layout/calc_erase_button"/>
<include layout="@layout/calc_functions_button"/>
<include layout="@layout/calc_paste_button"/>
<include layout="@layout/calc_one_digit_button"/>
<include layout="@layout/calc_two_digit_button"/>
<include layout="@layout/calc_three_digit_button"/>
<include layout="@layout/calc_four_digit_button"/>
<include layout="@layout/calc_five_digit_button"/>
<include layout="@layout/calc_plus_button"/>
<include layout="@layout/calc_subtraction_button"/>
<include layout="@layout/calc_round_brackets_button"/>
<include layout="@layout/calc_dot_button"/>
<include layout="@layout/calc_history_button"/>
<include layout="@layout/calc_clear_button"/>
</LinearLayout>
</LinearLayout>

View File

@ -10,75 +10,51 @@
a:layout_width="match_parent" a:layout_width="match_parent"
a:layout_height="match_parent" a:layout_height="match_parent"
a:id="@+id/main_layout" a:id="@+id/main_layout"
a:orientation="horizontal" a:orientation="vertical"
a:layout_gravity="center"
a:background="@color/default_background" a:background="@color/default_background"
a:baselineAligned="false"> a:baselineAligned="false">
<LinearLayout <LinearLayout
a:layout_height="match_parent" a:layout_height="0dp"
a:layout_width="0dp" a:layout_width="match_parent"
a:layout_weight="1" a:layout_weight="5"
a:orientation="vertical" a:orientation="horizontal"
style="?fragmentLayoutStyle" a:baselineAligned="false">
a:layout_gravity="center">
<LinearLayout a:id="@+id/editorContainer" <LinearLayout
a:layout_weight="4" a:layout_height="match_parent"
a:layout_width="match_parent" a:layout_width="0dp"
a:layout_height="0dp"/> a:layout_weight="1"
a:orientation="vertical"
a:layout_gravity="center">
<LinearLayout a:layout_weight="1" <LinearLayout a:id="@+id/editorContainer"
a:layout_width="match_parent" a:layout_height="0dp"
a:layout_height="0dp"> a:layout_width="match_parent"
style="?paneStyle"
<include layout="@layout/calc_left_button" a:layout_weight="4"/>
a:layout_margin="@dimen/button_margin"
a:layout_width="0dp"
a:layout_height="match_parent"
a:layout_weight="1"/>
<include layout="@layout/calc_erase_button"
a:layout_margin="@dimen/button_margin"
a:layout_width="0dp"
a:layout_height="match_parent"
a:layout_weight="1"/>
<LinearLayout a:id="@+id/displayContainer" <LinearLayout a:id="@+id/displayContainer"
a:layout_margin="@dimen/display_margin" a:layout_height="0dp"
a:layout_weight="4" a:layout_width="match_parent"
a:layout_width="0dp" style="?paneStyle"
a:layout_height="match_parent"/> a:layout_weight="1"/>
<include layout="@layout/calc_clear_button"
a:layout_margin="@dimen/button_margin"
a:layout_width="0dp"
a:layout_height="match_parent"
a:layout_weight="1"/>
<include layout="@layout/calc_right_button"
a:layout_margin="@dimen/button_margin"
a:layout_width="0dp"
a:layout_height="match_parent"
a:layout_weight="1"/>
</LinearLayout> </LinearLayout>
<LinearLayout a:id="@+id/keyboardContainer" <LinearLayout a:id="@+id/main_second_pane"
a:layout_weight="3" a:layout_height="match_parent"
a:layout_width="match_parent" a:layout_width="0dp"
a:layout_height="0dp"/> a:layout_weight="1"
a:orientation="vertical"
style="?secondPaneStyle"/>
</LinearLayout> </LinearLayout>
<LinearLayout a:id="@+id/keyboardContainer"
<LinearLayout a:id="@+id/main_second_pane" a:layout_height="0dp"
a:orientation="vertical" a:layout_width="match_parent"
a:layout_height="match_parent" a:layout_weight="1"
style="?secondPaneStyle" style="?fragmentLayoutStyle"/>
a:layout_width="0dp"
a:layout_weight="1"/>
</LinearLayout> </LinearLayout>

View File

@ -31,7 +31,6 @@
a:layout_height="match_parent"/> a:layout_height="match_parent"/>
<LinearLayout a:id="@+id/displayContainer" <LinearLayout a:id="@+id/displayContainer"
a:layout_margin="@dimen/display_margin"
a:layout_weight="4" a:layout_weight="4"
a:layout_width="0dp" a:layout_width="0dp"
a:layout_height="match_parent"/> a:layout_height="match_parent"/>

View File

@ -10,5 +10,6 @@
<attr name="fragmentTitleStyle" format="reference" /> <attr name="fragmentTitleStyle" format="reference" />
<attr name="fragmentListViewStyle" format="reference" /> <attr name="fragmentListViewStyle" format="reference" />
<attr name="buttonStyle" format="reference" /> <attr name="buttonStyle" format="reference" />
<attr name="paneStyle" format="reference" />
</resources> </resources>

View File

@ -1,5 +1,3 @@
<resources> <resources>
<dimen name="button_margin">0.5dp</dimen> <dimen name="button_margin">0.5dp</dimen>
<dimen name="display_margin">2.0dp</dimen>
<dimen name="display_margin_land">2.5dp</dimen>
</resources> </resources>

View File

@ -26,7 +26,6 @@
<item name="android:gravity">top|right</item> <item name="android:gravity">top|right</item>
<item name="android:layout_width">match_parent</item> <item name="android:layout_width">match_parent</item>
<item name="android:layout_height">match_parent</item> <item name="android:layout_height">match_parent</item>
<item name="android:layout_margin">@dimen/display_margin</item>
</style> </style>
<style name="about_style" parent="about_style_parent"> <style name="about_style" parent="about_style_parent">
@ -36,7 +35,7 @@
</style> </style>
<style name="default_text"> <style name="default_text">
<item name="android:background">@color/default_background</item> <item name="android:background">@android:color/transparent</item>
<item name="android:textColor">@color/default_text_color</item> <item name="android:textColor">@color/default_text_color</item>
</style> </style>

View File

@ -20,9 +20,9 @@
<item name="android:padding">6dp</item> <item name="android:padding">6dp</item>
</style> </style>
<style name="default_second_pane_style"> <style name="default_pane_style" parent="default_fragment_layout_style">
<item name="android:background">@drawable/second_pane_background</item> <item name="android:background">@drawable/second_pane_background</item>
<item name="android:layout_margin">5dp</item> <item name="android:padding">5dp</item>
</style> </style>
<style name="default_fragment_list_view_style"> <style name="default_fragment_list_view_style">
@ -46,7 +46,7 @@
</style> </style>
<style name="default_fragment_layout_style"> <style name="default_fragment_layout_style">
<item name="android:layout_marginBottom">5dp</item> <item name="android:layout_marginBottom">0dp</item>
<item name="android:layout_marginTop">5dp</item> <item name="android:layout_marginTop">5dp</item>
<item name="android:layout_marginLeft">5dp</item> <item name="android:layout_marginLeft">5dp</item>
<item name="android:layout_marginRight">0dp</item> <item name="android:layout_marginRight">0dp</item>
@ -58,7 +58,8 @@
<item name="controlImageButtonStyle">@style/default_control_image_button_style</item> <item name="controlImageButtonStyle">@style/default_control_image_button_style</item>
<item name="operationButtonStyle">@style/default_operation_button_style</item> <item name="operationButtonStyle">@style/default_operation_button_style</item>
<item name="fragmentLayoutStyle">@style/default_fragment_layout_style</item> <item name="fragmentLayoutStyle">@style/default_fragment_layout_style</item>
<item name="secondPaneStyle">@style/default_second_pane_style</item> <item name="paneStyle">@style/default_pane_style</item>
<item name="secondPaneStyle">@style/default_pane_style</item>
<item name="fragmentTitleStyle">@style/default_fragment_title_style</item> <item name="fragmentTitleStyle">@style/default_fragment_title_style</item>
<item name="fragmentListViewStyle">@style/default_fragment_list_view_style</item> <item name="fragmentListViewStyle">@style/default_fragment_list_view_style</item>
<item name="buttonStyle">@style/default_button_style</item> <item name="buttonStyle">@style/default_button_style</item>