android_1.6_compatibility

This commit is contained in:
serso 2011-10-20 14:57:59 +04:00
parent 1f846ad264
commit 916cc81d25
18 changed files with 136 additions and 116 deletions

View File

@ -1,41 +1,42 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:a="http://schemas.android.com/apk/res/android"
package="org.solovyev.android.calculator" package="org.solovyev.android.calculator"
android:versionCode="2" a:versionCode="2"
android:versionName="1.0.2"> a:versionName="1.0.2">
<uses-sdk android:minSdkVersion="8"/> <uses-sdk a:minSdkVersion="4"
a:targetSdkVersion="8"/>
<application android:icon="@drawable/icon" <application a:icon="@drawable/icon"
android:label="@string/c_app_name"> a:label="@string/c_app_name">
<activity android:name=".CalculatorActivity" <activity a:name=".CalculatorActivity"
android:label="@string/c_app_name"> a:label="@string/c_app_name">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN"/> <action a:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/> <category a:name="android.intent.category.LAUNCHER"/>
</intent-filter> </intent-filter>
</activity> </activity>
<activity android:name=".CalculatorPreferencesActivity" <activity a:name=".CalculatorPreferencesActivity"
android:label="@string/c_app_settings" a:label="@string/c_app_settings"
android:configChanges="orientation|keyboardHidden"/> a:configChanges="orientation|keyboardHidden"/>
<activity android:name=".CalculatorHistoryActivity" <activity a:name=".CalculatorHistoryActivity"
android:label="@string/c_app_history" a:label="@string/c_app_history"
android:configChanges="orientation|keyboardHidden"> a:configChanges="orientation|keyboardHidden">
</activity> </activity>
<activity android:name=".AboutActivity" <activity a:name=".AboutActivity"
android:label="@string/c_about" a:label="@string/c_about"
android:configChanges="orientation|keyboardHidden"/> a:configChanges="orientation|keyboardHidden"/>
<activity android:name=".CalculatorVarsActivity" <activity a:name=".CalculatorVarsActivity"
android:label="@string/c_vars_and_constants" a:label="@string/c_vars_and_constants"
android:configChanges="orientation|keyboardHidden"> a:configChanges="orientation|keyboardHidden">
</activity> </activity>
</application> </application>

View File

@ -8,4 +8,4 @@
# project structure. # project structure.
# Project target. # Project target.
target=android-8 target=android-4

View File

@ -3,19 +3,19 @@
<LinearLayout xmlns:a="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:a="http://schemas.android.com/apk/res/android"
xmlns:calc="http://schemas.android.com/apk/res/org.solovyev.android.calculator" xmlns:calc="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
a:orientation="vertical" a:orientation="vertical"
a:layout_width="match_parent" a:layout_width="fill_parent"
a:layout_height="match_parent" a:layout_height="fill_parent"
a:background="#ff000000"> a:background="#ff000000">
<LinearLayout <LinearLayout
a:layout_width="match_parent" a:layout_width="fill_parent"
a:layout_height="match_parent" a:layout_height="fill_parent"
a:orientation="vertical" a:orientation="vertical"
a:layout_gravity="center"> a:layout_gravity="center">
<include layout="@layout/calc_editor"/> <include layout="@layout/calc_editor"/>
<LinearLayout a:layout_weight="1" a:layout_width="match_parent" a:layout_height="0dp"> <LinearLayout a:layout_weight="1" a:layout_width="fill_parent" a:layout_height="0dp">
<org.solovyev.android.view.widgets.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android" <org.solovyev.android.view.widgets.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
xmlns:calc="http://schemas.android.com/apk/res/org.solovyev.android.calculator" xmlns:calc="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
@ -25,8 +25,8 @@
calc:directionTextScale="0.5" calc:directionTextScale="0.5"
style="?controlButtonStyle" style="?controlButtonStyle"
a:onClick="moveLeftButtonClickHandler" a:onClick="moveLeftButtonClickHandler"
a:layout_width="match_parent" a:layout_width="fill_parent"
a:layout_height="match_parent" a:layout_height="fill_parent"
a:layout_weight="1.5"/> a:layout_weight="1.5"/>
@ -36,14 +36,14 @@
a:drawableTop="@drawable/sym_keyboard_delete" a:drawableTop="@drawable/sym_keyboard_delete"
style="?controlImageButtonStyle" style="?controlImageButtonStyle"
a:onClick="eraseButtonClickHandler" a:onClick="eraseButtonClickHandler"
a:layout_width="match_parent" a:layout_width="fill_parent"
a:layout_height="match_parent" a:layout_height="fill_parent"
a:layout_weight="1.5"/> a:layout_weight="1.5"/>
<include layout="@layout/calc_display" <include layout="@layout/calc_display"
a:layout_width="match_parent" a:layout_width="fill_parent"
a:layout_height="match_parent" a:layout_height="fill_parent"
a:layout_weight="1"/> a:layout_weight="1"/>
<org.solovyev.android.view.widgets.ColorButton xmlns:a="http://schemas.android.com/apk/res/android" <org.solovyev.android.view.widgets.ColorButton xmlns:a="http://schemas.android.com/apk/res/android"
@ -53,8 +53,8 @@
a:textStyle="bold" a:textStyle="bold"
style="?controlImageButtonStyle" style="?controlImageButtonStyle"
a:onClick="clearButtonClickHandler" a:onClick="clearButtonClickHandler"
a:layout_width="match_parent" a:layout_width="fill_parent"
a:layout_height="match_parent" a:layout_height="fill_parent"
a:layout_weight="1.5"/> a:layout_weight="1.5"/>
<org.solovyev.android.view.widgets.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android" <org.solovyev.android.view.widgets.DirectionDragButton xmlns:a="http://schemas.android.com/apk/res/android"
@ -65,13 +65,13 @@
calc:directionTextScale="0.5" calc:directionTextScale="0.5"
style="?controlButtonStyle" style="?controlButtonStyle"
a:onClick="moveRightButtonClickHandler" a:onClick="moveRightButtonClickHandler"
a:layout_width="match_parent" a:layout_width="fill_parent"
a:layout_height="match_parent" a:layout_height="fill_parent"
a:layout_weight="1.5"/> a:layout_weight="1.5"/>
</LinearLayout> </LinearLayout>
<LinearLayout a:layout_weight="1" a:layout_width="match_parent" a:layout_height="0dp"> <LinearLayout a:layout_weight="1" a:layout_width="fill_parent" a:layout_height="0dp">
<include layout="@layout/calc_history_button"/> <include layout="@layout/calc_history_button"/>
<include layout="@layout/calc_paste_button"/> <include layout="@layout/calc_paste_button"/>
@ -83,7 +83,7 @@
</LinearLayout> </LinearLayout>
<LinearLayout a:layout_weight="1" a:layout_width="match_parent" a:layout_height="0dp"> <LinearLayout a:layout_weight="1" a:layout_width="fill_parent" a:layout_height="0dp">
<include layout="@layout/calc_vars_button"/> <include layout="@layout/calc_vars_button"/>
<include layout="@layout/calc_copy_button"/> <include layout="@layout/calc_copy_button"/>
@ -95,7 +95,7 @@
</LinearLayout> </LinearLayout>
<LinearLayout a:layout_weight="1" a:layout_width="match_parent" a:layout_height="0dp"> <LinearLayout a:layout_weight="1" a:layout_width="fill_parent" a:layout_height="0dp">
<include layout="@layout/calc_donate_button"/> <include layout="@layout/calc_donate_button"/>
<include layout="@layout/calc_square_brackets_button"/> <include layout="@layout/calc_square_brackets_button"/>

View File

@ -2,27 +2,27 @@
<LinearLayout xmlns:a="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:a="http://schemas.android.com/apk/res/android"
a:orientation="vertical" a:orientation="vertical"
a:layout_width="match_parent" a:layout_width="fill_parent"
a:layout_height="match_parent" a:layout_height="fill_parent"
a:background="#ff000000"> a:background="#ff000000">
<LinearLayout <LinearLayout
a:layout_width="match_parent" a:layout_width="fill_parent"
a:layout_height="match_parent" a:layout_height="fill_parent"
a:orientation="vertical" a:orientation="vertical"
a:layout_gravity="center"> a:layout_gravity="center">
<include layout="@layout/calc_editor"/> <include layout="@layout/calc_editor"/>
<LinearLayout a:layout_weight="1" a:layout_width="match_parent" a:layout_height="0dp"> <LinearLayout a:layout_weight="1" a:layout_width="fill_parent" a:layout_height="0dp">
<include layout="@layout/calc_display" <include layout="@layout/calc_display"
a:layout_width="match_parent" a:layout_width="fill_parent"
a:layout_height="match_parent"/> a:layout_height="fill_parent"/>
</LinearLayout> </LinearLayout>
<LinearLayout a:layout_weight="1" a:layout_width="match_parent" a:layout_height="0dp"> <LinearLayout a:layout_weight="1" a:layout_width="fill_parent" a:layout_height="0dp">
<include layout="@layout/calc_one_digit_button"/> <include layout="@layout/calc_one_digit_button"/>
<include layout="@layout/calc_two_digit_button"/> <include layout="@layout/calc_two_digit_button"/>
@ -32,7 +32,7 @@
</LinearLayout> </LinearLayout>
<LinearLayout a:layout_weight="1" a:layout_width="match_parent" a:layout_height="0dp"> <LinearLayout a:layout_weight="1" a:layout_width="fill_parent" a:layout_height="0dp">
<include layout="@layout/calc_four_digit_button"/> <include layout="@layout/calc_four_digit_button"/>
<include layout="@layout/calc_five_digit_button"/> <include layout="@layout/calc_five_digit_button"/>
@ -42,7 +42,7 @@
</LinearLayout> </LinearLayout>
<LinearLayout a:layout_weight="1" a:layout_width="match_parent" a:layout_height="0dp"> <LinearLayout a:layout_weight="1" a:layout_width="fill_parent" a:layout_height="0dp">
<include layout="@layout/calc_seven_digit_button"/> <include layout="@layout/calc_seven_digit_button"/>
<include layout="@layout/calc_eight_digit_button"/> <include layout="@layout/calc_eight_digit_button"/>
@ -52,7 +52,7 @@
</LinearLayout> </LinearLayout>
<LinearLayout a:layout_weight="1" a:layout_width="match_parent" a:layout_height="0dp"> <LinearLayout a:layout_weight="1" a:layout_width="fill_parent" a:layout_height="0dp">
<include layout="@layout/calc_round_brackets_button"/> <include layout="@layout/calc_round_brackets_button"/>
<include layout="@layout/calc_zero_digit_button"/> <include layout="@layout/calc_zero_digit_button"/>
@ -63,7 +63,7 @@
</LinearLayout> </LinearLayout>
<LinearLayout a:layout_weight="1" a:layout_width="match_parent" a:layout_height="0dp"> <LinearLayout a:layout_weight="1" a:layout_width="fill_parent" a:layout_height="0dp">
<include layout="@layout/calc_left_button"/> <include layout="@layout/calc_left_button"/>
<include layout="@layout/calc_right_button"/> <include layout="@layout/calc_right_button"/>

View File

@ -8,8 +8,8 @@
<LinearLayout xmlns:a="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:a="http://schemas.android.com/apk/res/android"
a:orientation="vertical" a:orientation="vertical"
a:layout_width="match_parent" a:layout_width="fill_parent"
a:layout_height="match_parent" a:layout_height="fill_parent"
a:background="#ff000000"> a:background="#ff000000">
<ImageView a:layout_width="wrap_content" <ImageView a:layout_width="wrap_content"
@ -22,12 +22,26 @@
<TextView <TextView
a:id="@+id/aboutTextView" a:id="@+id/aboutTextView"
a:text="@string/c_copyright" a:text="@string/c_copyright"
a:layout_height="match_parent" a:layout_height="fill_parent"
a:layout_width="match_parent" a:layout_width="fill_parent"
a:layout_gravity="top|center_horizontal"
a:layout_weight="1"
a:scrollbars="vertical"
style="@style/about_style"/>
<!--
a:scrollbarFadeDuration="0" is not support in android_1.6_compatibility
<TextView
a:id="@+id/aboutTextView"
a:text="@string/c_copyright"
a:layout_height="fill_parent"
a:layout_width="fill_parent"
a:layout_gravity="top|center_horizontal" a:layout_gravity="top|center_horizontal"
a:layout_weight="1" a:layout_weight="1"
a:scrollbars="vertical" a:scrollbars="vertical"
a:scrollbarFadeDuration="0" a:scrollbarFadeDuration="0"
style="@style/about_style"/> style="@style/about_style"/>
-->
</LinearLayout> </LinearLayout>

View File

@ -8,7 +8,7 @@
<LinearLayout xmlns:a="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:a="http://schemas.android.com/apk/res/android"
a:layout_weight="2" a:layout_weight="2"
a:layout_width="match_parent" a:layout_width="fill_parent"
a:layout_height="0dp"> a:layout_height="0dp">
<org.solovyev.android.calculator.CalculatorEditor <org.solovyev.android.calculator.CalculatorEditor

View File

@ -9,7 +9,7 @@
xmlns:a="http://schemas.android.com/apk/res/android" xmlns:a="http://schemas.android.com/apk/res/android"
a:id="@+id/equalsButton" a:id="@+id/equalsButton"
a:text="=" a:text="="
a:layout_width="match_parent" a:layout_width="fill_parent"
a:layout_height="match_parent" a:layout_height="fill_parent"
style="?controlButtonStyle" style="?controlButtonStyle"
a:onClick="numericButtonClickHandler"/> a:onClick="numericButtonClickHandler"/>

View File

@ -7,13 +7,13 @@
--> -->
<LinearLayout xmlns:a="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:a="http://schemas.android.com/apk/res/android"
a:layout_width="match_parent" a:layout_width="fill_parent"
a:layout_height="match_parent"> a:layout_height="fill_parent">
<TextView a:id="@+id/donateText" <TextView a:id="@+id/donateText"
style="@style/about_style" style="@style/about_style"
a:layout_width="match_parent" a:layout_width="fill_parent"
a:text="@string/c_donate_text" a:text="@string/c_donate_text"
a:layout_height="match_parent"/> a:layout_height="fill_parent"/>
</LinearLayout> </LinearLayout>

View File

@ -3,18 +3,18 @@
<LinearLayout xmlns:a="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:a="http://schemas.android.com/apk/res/android"
xmlns:calc="http://schemas.android.com/apk/res/org.solovyev.android.calculator" xmlns:calc="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
a:orientation="vertical" a:orientation="vertical"
a:layout_width="match_parent" a:layout_width="fill_parent"
a:layout_height="match_parent" a:layout_height="fill_parent"
a:background="#ff000000"> a:background="#ff000000">
<LinearLayout <LinearLayout
a:id="@+id/simplePad" a:id="@+id/simplePad"
a:layout_width="match_parent" a:layout_width="fill_parent"
a:layout_height="match_parent" a:layout_height="fill_parent"
a:orientation="vertical" a:orientation="vertical"
a:layout_gravity="center"> a:layout_gravity="center">
<LinearLayout a:layout_weight="1" a:layout_width="match_parent" a:layout_height="0dp"> <LinearLayout a:layout_weight="1" a:layout_width="fill_parent" a:layout_height="0dp">
<ImageView a:id="@+id/calibrationArrowLeft" <ImageView a:id="@+id/calibrationArrowLeft"
a:layout_gravity="left" a:layout_gravity="left"

View File

@ -8,20 +8,20 @@
<LinearLayout xmlns:a="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:a="http://schemas.android.com/apk/res/android"
a:orientation="vertical" a:orientation="vertical"
a:layout_width="match_parent" a:layout_width="fill_parent"
a:layout_height="match_parent"> a:layout_height="fill_parent">
<TextView a:id="@+id/history_time" <TextView a:id="@+id/history_time"
a:layout_width="match_parent" a:layout_width="fill_parent"
a:layout_height="match_parent" a:layout_height="fill_parent"
a:textColor="@android:color/white" a:textColor="@android:color/white"
a:paddingLeft="6dp" a:paddingLeft="6dp"
a:paddingRight="6dp" a:paddingRight="6dp"
a:textStyle="bold"/> a:textStyle="bold"/>
<TextView a:id="@+id/history_item" <TextView a:id="@+id/history_item"
a:layout_width="match_parent" a:layout_width="fill_parent"
a:layout_height="match_parent" a:layout_height="fill_parent"
a:paddingBottom="6dp" a:paddingBottom="6dp"
a:paddingLeft="6dp" a:paddingLeft="6dp"
a:paddingRight="6dp"/> a:paddingRight="6dp"/>

View File

@ -8,12 +8,12 @@
<LinearLayout xmlns:a="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:a="http://schemas.android.com/apk/res/android"
a:orientation="vertical" a:orientation="vertical"
a:layout_width="match_parent" a:layout_width="fill_parent"
a:layout_height="match_parent"> a:layout_height="fill_parent">
<ListView <ListView
a:layout_width="match_parent" a:layout_width="fill_parent"
a:layout_height="match_parent" a:layout_height="fill_parent"
a:layout_weight="1" a:layout_weight="1"
a:id="@android:id/list"/> a:id="@android:id/list"/>

View File

@ -9,12 +9,12 @@
<merge xmlns:android="http://schemas.android.com/apk/res/android"> <merge xmlns:android="http://schemas.android.com/apk/res/android">
<org.solovyev.android.view.widgets.NumberPickerButton android:id="@+id/increment" <org.solovyev.android.view.widgets.NumberPickerButton android:id="@+id/increment"
android:layout_width="match_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/timepicker_up_btn" /> android:background="@drawable/timepicker_up_btn" />
<EditText android:id="@+id/timepicker_input" <EditText android:id="@+id/timepicker_input"
android:layout_width="match_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:gravity="center" android:gravity="center"
android:singleLine="true" android:singleLine="true"
@ -24,7 +24,7 @@
android:background="@drawable/timepicker_input" /> android:background="@drawable/timepicker_input" />
<org.solovyev.android.view.widgets.NumberPickerButton android:id="@+id/decrement" <org.solovyev.android.view.widgets.NumberPickerButton android:id="@+id/decrement"
android:layout_width="match_parent" android:layout_width="fill_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@drawable/timepicker_down_btn" /> android:background="@drawable/timepicker_down_btn" />

View File

@ -8,17 +8,17 @@
<LinearLayout xmlns:a="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:a="http://schemas.android.com/apk/res/android"
a:orientation="vertical" a:orientation="vertical"
a:layout_width="match_parent" a:layout_width="fill_parent"
a:layout_height="match_parent"> a:layout_height="fill_parent">
<LinearLayout <LinearLayout
a:orientation="horizontal" a:orientation="horizontal"
a:layout_width="match_parent" a:layout_width="fill_parent"
a:layout_height="match_parent"> a:layout_height="fill_parent">
<TextView a:id="@+id/var_text" <TextView a:id="@+id/var_text"
a:layout_width="match_parent" a:layout_width="fill_parent"
a:layout_height="match_parent" a:layout_height="fill_parent"
a:textSize="20dp" a:textSize="20dp"
a:textColor="@android:color/white" a:textColor="@android:color/white"
a:paddingBottom="3dp" a:paddingBottom="3dp"
@ -31,8 +31,8 @@
</LinearLayout> </LinearLayout>
<TextView a:id="@+id/var_description" <TextView a:id="@+id/var_description"
a:layout_width="match_parent" a:layout_width="fill_parent"
a:layout_height="match_parent" a:layout_height="fill_parent"
a:paddingBottom="6dp" a:paddingBottom="6dp"
a:paddingLeft="6dp" a:paddingLeft="6dp"
a:paddingRight="6dp" a:paddingRight="6dp"

View File

@ -7,47 +7,47 @@
--> -->
<ScrollView xmlns:a="http://schemas.android.com/apk/res/android" <ScrollView xmlns:a="http://schemas.android.com/apk/res/android"
a:layout_width="match_parent" a:layout_width="fill_parent"
a:layout_height="match_parent"> a:layout_height="fill_parent">
<LinearLayout xmlns:a="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:a="http://schemas.android.com/apk/res/android"
a:id="@+id/var_edit" a:id="@+id/var_edit"
a:orientation="vertical" a:orientation="vertical"
a:layout_width="match_parent" a:layout_width="fill_parent"
a:layout_height="match_parent" a:layout_height="fill_parent"
a:scrollbars="vertical" a:scrollbars="vertical"
a:scrollbarAlwaysDrawVerticalTrack="true"> a:scrollbarAlwaysDrawVerticalTrack="true">
<TextView a:layout_height="match_parent" <TextView a:layout_height="fill_parent"
a:layout_width="wrap_content" a:layout_width="wrap_content"
a:padding="6dp" a:padding="6dp"
a:text="@string/c_var_name"/> a:text="@string/c_var_name"/>
<EditText a:id="@+id/var_edit_name" <EditText a:id="@+id/var_edit_name"
a:layout_width="match_parent" a:layout_width="fill_parent"
a:layout_height="wrap_content" a:layout_height="wrap_content"
a:textSize="20dp"> a:textSize="20dp">
</EditText> </EditText>
<TextView a:layout_height="match_parent" <TextView a:layout_height="fill_parent"
a:layout_width="wrap_content" a:layout_width="wrap_content"
a:padding="6dp" a:padding="6dp"
a:text="@string/c_var_value"/> a:text="@string/c_var_value"/>
<EditText a:id="@+id/var_edit_value" <EditText a:id="@+id/var_edit_value"
a:layout_width="match_parent" a:layout_width="fill_parent"
a:layout_height="wrap_content" a:layout_height="wrap_content"
a:inputType="numberDecimal" a:inputType="numberDecimal"
a:textSize="20dp"> a:textSize="20dp">
</EditText> </EditText>
<TextView a:layout_height="match_parent" <TextView a:layout_height="fill_parent"
a:layout_width="wrap_content" a:layout_width="wrap_content"
a:padding="6dp" a:padding="6dp"
a:text="@string/c_var_description"/> a:text="@string/c_var_description"/>
<EditText a:id="@+id/var_edit_description" <EditText a:id="@+id/var_edit_description"
a:layout_width="match_parent" a:layout_width="fill_parent"
a:layout_height="wrap_content" a:layout_height="wrap_content"
a:textSize="20dp"> a:textSize="20dp">
</EditText> </EditText>

View File

@ -8,12 +8,12 @@
<LinearLayout xmlns:a="http://schemas.android.com/apk/res/android" <LinearLayout xmlns:a="http://schemas.android.com/apk/res/android"
a:orientation="vertical" a:orientation="vertical"
a:layout_width="match_parent" a:layout_width="fill_parent"
a:layout_height="match_parent"> a:layout_height="fill_parent">
<ListView <ListView
a:layout_width="match_parent" a:layout_width="fill_parent"
a:layout_height="match_parent" a:layout_height="fill_parent"
a:layout_weight="1" a:layout_weight="1"
a:id="@android:id/list"/> a:id="@android:id/list"/>

View File

@ -8,8 +8,8 @@
</style> </style>
<style name="button_style"> <style name="button_style">
<item name="android:layout_width">match_parent</item> <item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">match_parent</item> <item name="android:layout_height">fill_parent</item>
<item name="android:layout_weight">1</item> <item name="android:layout_weight">1</item>
<item name="android:focusable">true</item> <item name="android:focusable">true</item>
<item name="android:textSize">20dp</item> <item name="android:textSize">20dp</item>
@ -58,8 +58,8 @@
<item name="android:textColor">@color/text_color</item> <item name="android:textColor">@color/text_color</item>
<item name="android:gravity">left|top</item> <item name="android:gravity">left|top</item>
<item name="android:padding">5dp</item> <item name="android:padding">5dp</item>
<item name="android:layout_width">match_parent</item> <item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">match_parent</item> <item name="android:layout_height">fill_parent</item>
</style> </style>
<style name="display_style"> <style name="display_style">
@ -68,8 +68,8 @@
<item name="android:textColor">@color/text_color</item> <item name="android:textColor">@color/text_color</item>
<item name="android:gravity">right|center_vertical</item> <item name="android:gravity">right|center_vertical</item>
<item name="android:padding">5dp</item> <item name="android:padding">5dp</item>
<item name="android:layout_width">match_parent</item> <item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">match_parent</item> <item name="android:layout_height">fill_parent</item>
</style> </style>
<style name="about_style"> <style name="about_style">
@ -78,8 +78,8 @@
<item name="android:textColor">@color/text_color</item> <item name="android:textColor">@color/text_color</item>
<item name="android:gravity">center</item> <item name="android:gravity">center</item>
<item name="android:padding">5dp</item> <item name="android:padding">5dp</item>
<item name="android:layout_width">match_parent</item> <item name="android:layout_width">fill_parent</item>
<item name="android:layout_height">match_parent</item> <item name="android:layout_height">fill_parent</item>
</style> </style>
<style name="default_theme"> <style name="default_theme">

View File

@ -341,13 +341,18 @@ public class CalculatorActivity extends Activity implements FontSizeAdjuster, Sh
public void restart() { public void restart() {
final Intent intent = getIntent(); final Intent intent = getIntent();
/*
for compatibility with android_1.6_compatibility
overridePendingTransition(0, 0); overridePendingTransition(0, 0);
intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION); intent.addFlags(Intent.FLAG_ACTIVITY_NO_ANIMATION);*/
Log.d(this.getClass().getName(), "Finishing current activity!"); Log.d(this.getClass().getName(), "Finishing current activity!");
finish(); finish();
overridePendingTransition(0, 0); /*
for compatibility with android_1.6_compatibility
overridePendingTransition(0, 0);*/
Log.d(this.getClass().getName(), "Starting new activity!"); Log.d(this.getClass().getName(), "Starting new activity!");
startActivity(intent); startActivity(intent);
} }

View File

@ -283,8 +283,8 @@ public class NumberPicker extends LinearLayout {
if (displayedValues != null) { if (displayedValues != null) {
// Allow text entry rather than strictly numeric entry. // Allow text entry rather than strictly numeric entry.
mText.setRawInputType(InputType.TYPE_CLASS_TEXT | mText.setRawInputType(InputType.TYPE_CLASS_TEXT/* |
InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS); InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS*/);
} }
} }