From 534d76250e509a7a6e215901454caed519d653f1 Mon Sep 17 00:00:00 2001 From: serso Date: Sun, 11 Sep 2011 17:31:31 +0400 Subject: [PATCH] new interface implementation --- .../calculator/CalculatorPreferencesActivity.java | 9 --------- .../calculator/DragButtonCalibrationActivity.java | 1 - src/org/solovyev/android/view/ColorButton.java | 6 ++---- src/org/solovyev/android/view/DirectionDragButton.java | 7 +++---- 4 files changed, 5 insertions(+), 18 deletions(-) diff --git a/src/org/solovyev/android/calculator/CalculatorPreferencesActivity.java b/src/org/solovyev/android/calculator/CalculatorPreferencesActivity.java index 6f81d673..436c889c 100644 --- a/src/org/solovyev/android/calculator/CalculatorPreferencesActivity.java +++ b/src/org/solovyev/android/calculator/CalculatorPreferencesActivity.java @@ -1,18 +1,9 @@ package org.solovyev.android.calculator; -import android.app.Activity; import android.content.Intent; -import android.content.SharedPreferences; import android.os.Bundle; import android.preference.Preference; import android.preference.PreferenceActivity; -import android.widget.Button; -import android.widget.Toast; -import org.apache.http.Header; - -import java.security.KeyStore; -import java.util.List; -import java.util.prefs.PreferencesFactory; /** * User: serso diff --git a/src/org/solovyev/android/calculator/DragButtonCalibrationActivity.java b/src/org/solovyev/android/calculator/DragButtonCalibrationActivity.java index 5c72311f..a2efa2b2 100644 --- a/src/org/solovyev/android/calculator/DragButtonCalibrationActivity.java +++ b/src/org/solovyev/android/calculator/DragButtonCalibrationActivity.java @@ -4,7 +4,6 @@ import android.app.Activity; import android.content.Context; import android.content.Intent; import android.content.SharedPreferences; -import android.net.Uri; import android.os.Bundle; import android.os.Handler; import android.util.Log; diff --git a/src/org/solovyev/android/view/ColorButton.java b/src/org/solovyev/android/view/ColorButton.java index 13ea5f43..449d0e64 100644 --- a/src/org/solovyev/android/view/ColorButton.java +++ b/src/org/solovyev/android/view/ColorButton.java @@ -25,8 +25,6 @@ import android.widget.Button; import android.view.MotionEvent; import android.content.res.Resources; import org.jetbrains.annotations.NotNull; -import org.solovyev.android.calculator.R; -import org.solovyev.util.StringUtils; import org.solovyev.util.math.Point2d; /** @@ -60,11 +58,11 @@ public class ColorButton extends Button { protected void init(Context context) { Resources res = getResources(); - CLICK_FEEDBACK_COLOR = res.getColor(R.color.magic_flame); + CLICK_FEEDBACK_COLOR = res.getColor(org.solovyev.android.calculator.R.color.magic_flame); mFeedbackPaint = new Paint(); mFeedbackPaint.setStyle(Style.STROKE); mFeedbackPaint.setStrokeWidth(2); - getPaint().setColor(res.getColor(R.color.button_text)); + getPaint().setColor(res.getColor(org.solovyev.android.calculator.R.color.button_text)); mAnimStart = -1; diff --git a/src/org/solovyev/android/view/DirectionDragButton.java b/src/org/solovyev/android/view/DirectionDragButton.java index 5b4953ad..312f1ecd 100644 --- a/src/org/solovyev/android/view/DirectionDragButton.java +++ b/src/org/solovyev/android/view/DirectionDragButton.java @@ -4,7 +4,6 @@ import android.content.Context; import android.content.res.TypedArray; import android.graphics.Canvas; import android.graphics.Paint; -import android.text.Html; import android.text.TextPaint; import android.util.AttributeSet; import org.jetbrains.annotations.NotNull; @@ -46,16 +45,16 @@ public class DirectionDragButton extends DragButton { private void init(@NotNull Context context, @NotNull AttributeSet attrs) { - TypedArray a = context.obtainStyledAttributes(attrs, R.styleable.DragButton); + TypedArray a = context.obtainStyledAttributes(attrs, org.solovyev.android.calculator.R.styleable.DragButton); final int N = a.getIndexCount(); for (int i = 0; i < N; i++) { int attr = a.getIndex(i); switch (attr) { - case R.styleable.DragButton_textUp: + case org.solovyev.android.calculator.R.styleable.DragButton_textUp: this.textUp = a.getString(attr); break; - case R.styleable.DragButton_textDown: + case org.solovyev.android.calculator.R.styleable.DragButton_textDown: this.textDown = a.getString(attr); break; }