android common update

This commit is contained in:
Sergey Solovyev 2012-11-16 00:27:34 +04:00
parent 6dfc26dc2a
commit 6565b28921
12 changed files with 37 additions and 48 deletions

View File

@ -9,18 +9,19 @@
# Project target.
target=android-15
android.library.reference.1=gen-external-apklibs/org.solovyev.android_android-common-all_1.0.4
android.library.reference.2=gen-external-apklibs/org.solovyev.android_android-common-ads_1.0.4
android.library.reference.3=gen-external-apklibs/org.solovyev.android_android-common-core_1.0.4
android.library.reference.4=gen-external-apklibs/org.solovyev.android_android-common-billing_1.0.4
android.library.reference.5=gen-external-apklibs/org.solovyev.android_android-common-db_1.0.4
android.library.reference.6=gen-external-apklibs/org.solovyev.android_android-common-http_1.0.4
android.library.reference.7=gen-external-apklibs/org.solovyev.android_android-common-list_1.0.4
android.library.reference.8=gen-external-apklibs/org.solovyev.android_android-common-view_1.0.4
android.library.reference.9=gen-external-apklibs/org.solovyev.android_android-common-preferences_1.0.4
android.library.reference.10=gen-external-apklibs/org.solovyev.android_android-common-menu_1.0.4
android.library.reference.11=gen-external-apklibs/org.solovyev.android_android-common-other_1.0.4
android.library.reference.12=gen-external-apklibs/org.solovyev.android_android-common-sherlock_1.0.4
android.library.reference.1=gen-external-apklibs/org.solovyev.android_android-common-all_1.0.5-SNAPSHOT
android.library.reference.2=gen-external-apklibs/org.solovyev.android_android-common-ads_1.0.5-SNAPSHOT
android.library.reference.3=gen-external-apklibs/org.solovyev.android_android-common-core_1.0.5-SNAPSHOT
android.library.reference.4=gen-external-apklibs/org.solovyev.android_android-common-billing_1.0.5-SNAPSHOT
android.library.reference.5=gen-external-apklibs/org.solovyev.android_android-common-db_1.0.5-SNAPSHOT
android.library.reference.6=gen-external-apklibs/org.solovyev.android_android-common-http_1.0.5-SNAPSHOT
android.library.reference.7=gen-external-apklibs/org.solovyev.android_android-common-list_1.0.5-SNAPSHOT
android.library.reference.8=gen-external-apklibs/org.solovyev.android_android-common-view_1.0.5-SNAPSHOT
android.library.reference.9=gen-external-apklibs/org.solovyev.android_android-common-preferences_1.0.5-SNAPSHOT
android.library.reference.10=gen-external-apklibs/org.solovyev.android_android-common-menu_1.0.5-SNAPSHOT
android.library.reference.11=gen-external-apklibs/org.solovyev.android_android-common-other_1.0.5-SNAPSHOT
android.library.reference.12=gen-external-apklibs/org.solovyev.android_android-common-sherlock_1.0.5-SNAPSHOT
android.library.reference.13=gen-external-apklibs/com.actionbarsherlock_actionbarsherlock_4.2.0
android.library.reference.14=gen-external-apklibs/org.solovyev.android_android-common-keyboard_1.0.5-SNAPSHOT

View File

@ -6,9 +6,8 @@
~ or visit http://se.solovyev.org
-->
<org.solovyev.android.view.ColorButton xmlns:a="http://schemas.android.com/apk/res/android"
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
<ImageButton xmlns:a="http://schemas.android.com/apk/res/android"
a:id="@+id/copyButton"
a:drawableTop="@drawable/kb_copy"
a:src="@drawable/kb_copy"
style="?controlImageButtonStyle"
a:onClick="copyButtonClickHandler"/>

View File

@ -6,8 +6,8 @@
~ or visit http://se.solovyev.org
-->
<org.solovyev.android.view.ColorButton xmlns:a="http://schemas.android.com/apk/res/android"
<ImageButton xmlns:a="http://schemas.android.com/apk/res/android"
a:id="@+id/likeButton"
a:drawableTop="@drawable/kb_facebook"
a:src="@drawable/kb_facebook"
style="?controlImageButtonStyle"
a:onClick="likeButtonClickHandler"/>

View File

@ -6,9 +6,8 @@
~ or visit http://se.solovyev.org
-->
<org.solovyev.android.view.ColorButton xmlns:a="http://schemas.android.com/apk/res/android"
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
<ImageButton xmlns:a="http://schemas.android.com/apk/res/android"
a:id="@+id/eraseButton"
a:drawableTop="@drawable/kb_delete"
a:src="@drawable/kb_delete"
style="?controlImageButtonStyle"
a:onClick="eraseButtonClickHandler"/>

View File

@ -6,9 +6,8 @@
~ or visit http://se.solovyev.org
-->
<org.solovyev.android.view.ColorButton xmlns:a="http://schemas.android.com/apk/res/android"
xmlns:c="http://schemas.android.com/apk/res/org.solovyev.android.calculator"
<ImageButton xmlns:a="http://schemas.android.com/apk/res/android"
a:id="@+id/pasteButton"
a:drawableTop="@drawable/kb_paste"
a:src="@drawable/kb_paste"
style="?controlImageButtonStyle"
a:onClick="pasteButtonClickHandler"/>

View File

@ -8,6 +8,7 @@
<dimen name="keyboard_button_text_size">30dp</dimen>
<dimen name="button_text_size">20dp</dimen>
<dimen name="button_text_size_mobile">20dp</dimen>
<dimen name="display_text_size">25sp</dimen>
<dimen name="editor_text_size">25sp</dimen>
<dimen name="pane_margin">5dp</dimen>

View File

@ -38,7 +38,7 @@
<item name="android:layout_height">fill_parent</item>
<item name="android:layout_weight">1</item>
<item name="android:focusable">true</item>
<item name="android:background">@drawable/default_button_dark</item>
<item name="android:background">@drawable/metro_button_dark</item>
<item name="android:layout_margin">@dimen/button_margin</item>
<item name="android:textSize">@dimen/keyboard_button_text_size</item>
<item name="android:textColor">@color/button_text_color</item>

View File

@ -7,7 +7,7 @@
<resources>
<style name="default_digit_button_style" parent="keyboard_button_style">
<item name="android:background">@drawable/default_button</item>
<item name="android:background">@drawable/metro_button_dark</item>
</style>
<style name="default_control_button_style" parent="keyboard_button_style"/>

View File

@ -160,7 +160,7 @@ public abstract class AbstractCalculatorHelper implements SharedPreferences.OnSh
toggleButtonDirectionText(root, R.id.plusButton, false, DragDirection.down, DragDirection.up);
}
CalculatorButtons.processButtons(true, theme, root);
CalculatorButtons.processButtons(true, theme, layout, root);
CalculatorButtons.toggleEqualsButton(preferences, activity);
CalculatorButtons.initMultiplicationButton(root);
NumeralBaseButtons.toggleNumericDigits(activity, preferences);

View File

@ -27,7 +27,6 @@ import org.solovyev.android.calculator.about.CalculatorFragmentType;
import org.solovyev.android.calculator.about.CalculatorReleaseNotesFragment;
import org.solovyev.android.fragments.FragmentUtils;
import org.solovyev.android.prefs.Preference;
import org.solovyev.android.view.ColorButton;
import org.solovyev.common.equals.EqualsTool;
import org.solovyev.common.history.HistoryAction;
import org.solovyev.common.text.StringUtils;
@ -279,15 +278,7 @@ public class CalculatorActivity extends SherlockFragmentActivity implements Shar
Log.d(String.valueOf(v.getId()), "digitButtonClickHandler() for: " + v.getId() + ". Pressed: " + v.isPressed());
if (v instanceof Button) {
boolean processText = true;
if ( v instanceof ColorButton) {
processText = ((ColorButton) v).isShowText();
}
if ( processText ) {
buttonPressed(((Button)v).getText().toString());
}
buttonPressed(((Button)v).getText().toString());
}
}

View File

@ -19,7 +19,6 @@ import org.solovyev.android.AndroidUtils;
import org.solovyev.android.calculator.model.AndroidCalculatorEngine;
import org.solovyev.android.calculator.view.AngleUnitsButton;
import org.solovyev.android.calculator.view.NumeralBasesButton;
import org.solovyev.android.view.ColorButton;
import org.solovyev.android.view.drag.DragButton;
import org.solovyev.android.view.drag.DragDirection;
import org.solovyev.android.view.drag.SimpleOnDragListener;
@ -38,18 +37,18 @@ public final class CalculatorButtons {
public static void processButtons(boolean fixMagicFlames,
@NotNull CalculatorPreferences.Gui.Theme theme,
@NotNull CalculatorPreferences.Gui.Layout layout,
@NotNull View root) {
if (theme.getThemeType() == CalculatorPreferences.Gui.ThemeType.metro) {
if ( layout == CalculatorPreferences.Gui.Layout.main_calculator_mobile ) {
if (fixMagicFlames) {
// for metro themes we should turn off magic flames
AndroidUtils.processViewsOfType(root, ColorButton.class, new AndroidUtils.ViewProcessor<ColorButton>() {
@Override
public void process(@NotNull ColorButton colorButton) {
colorButton.setDrawMagicFlame(false);
}
});
}
final float textSize =root.getResources().getDimension(R.dimen.button_text_size_mobile);
AndroidUtils.processViewsOfType(root, DragButton.class, new AndroidUtils.ViewProcessor<DragButton>() {
@Override
public void process(@NotNull DragButton button) {
button.setTextSize(textSize);
}
});
}
}

View File

@ -30,7 +30,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<android.common.version>1.0.4</android.common.version>
<android.common.version>1.0.5-SNAPSHOT</android.common.version>
<common.version>1.0.1</common.version>
</properties>