android common update
This commit is contained in:
parent
6dfc26dc2a
commit
6565b28921
@ -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
|
||||
|
||||
|
||||
|
@ -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"/>
|
@ -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"/>
|
@ -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"/>
|
@ -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"/>
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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"/>
|
||||
|
@ -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);
|
||||
|
@ -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,17 +278,9 @@ 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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void buttonPressed(@NotNull CalculatorSpecialButton button) {
|
||||
buttonPressed(button.getActionCode());
|
||||
|
@ -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,20 +37,20 @@ 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>() {
|
||||
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 ColorButton colorButton) {
|
||||
colorButton.setDrawMagicFlame(false);
|
||||
public void process(@NotNull DragButton button) {
|
||||
button.setTextSize(textSize);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void initMultiplicationButton(@NotNull View root) {
|
||||
final View multiplicationButton = root.findViewById(R.id.multiplicationButton);
|
||||
|
Loading…
Reference in New Issue
Block a user