Skip to content

Commit

Permalink
bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Xlythe committed May 17, 2014
1 parent 920cdf2 commit fdd7c43
Show file tree
Hide file tree
Showing 7 changed files with 73 additions and 267 deletions.
Binary file modified Calculator/Calculator-Calculator.apk
Binary file not shown.
4 changes: 2 additions & 2 deletions Calculator/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
defaultConfig {
minSdkVersion 14
targetSdkVersion 19
versionCode 61
versionName "4.2.1"
versionCode 62
versionName "4.2.2"
}
buildTypes {
release {
Expand Down
4 changes: 2 additions & 2 deletions Calculator/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.android2.calculator3"
android:installLocation="auto"
android:versionCode="61"
android:versionName="4.2.1">
android:versionCode="62"
android:versionName="4.2.2">

<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ class ColorButton extends ThemedButton {
public ColorButton(Context context, AttributeSet attrs) {
super(context, attrs);
Calculator calc = (Calculator) context;
init(calc, attrs);
init();
mListener = calc.mListener;
setOnClickListener(mListener);
setOnLongClickListener(mListener);
mHintPaint = new Paint(getPaint());
}

private void init(Calculator calc, AttributeSet attrs) {
private void init() {
CLICK_FEEDBACK_COLOR = Theme.getColor(getContext(), R.color.magic_flame);
mFeedbackPaint = new Paint();
mFeedbackPaint.setStyle(Style.STROKE);
Expand All @@ -78,8 +78,6 @@ private void layoutText() {
mTextX = (getWidth() - textWidth) / 2;
}
mTextY = (getHeight() - paint.ascent() - paint.descent()) / 2;
if (mHintPaint != null)
mHintPaint.setTextSize(paint.getTextSize() * getContext().getResources().getInteger(R.integer.button_hint_text_size_percent) / 100f);
}

@Override
Expand Down Expand Up @@ -123,6 +121,7 @@ protected void onDraw(Canvas canvas) {
mHintPaint.setColor(Theme.getColor(getContext(), R.color.button_hint_text));
CharSequence hint = getHint();
if (hint != null) {
mHintPaint.setTextSize(getPaint().getTextSize() * getContext().getResources().getInteger(R.integer.button_hint_text_size_percent) / 100f);
int offsetX = getContext().getResources().getDimensionPixelSize(R.dimen.button_hint_offset_x);
int offsetY = (int) ((mTextY + getContext().getResources().getDimensionPixelSize(R.dimen.button_hint_offset_y) - mHintPaint.getTextSize()) / 2) - getPaddingTop();

Expand Down
256 changes: 0 additions & 256 deletions Calculator/src/main/java/com/android2/calculator3/view/GraphView2.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,20 @@
import android.view.Gravity;
import android.view.View;
import android.widget.EditText;
import android.widget.TableLayout;
import android.widget.TableRow;

import com.android2.calculator3.Logic;
import com.android2.calculator3.MutableString;
import com.android2.calculator3.R;
import com.xlythe.engine.theme.Theme;
import com.xlythe.engine.theme.ThemedTableLayout;

import org.ejml.simple.SimpleMatrix;
import org.javia.arity.SyntaxException;

import java.util.regex.Pattern;

public class MatrixView extends TableLayout {
public class MatrixView extends ThemedTableLayout {
private int mRows, mColumns = 0;
private AdvancedDisplay mParent;
private Logic mLogic;
Expand Down Expand Up @@ -141,7 +142,7 @@ private static String parseMatrix(String text) {

private void setup() {
mSeparator = getSeparator(getContext());
setBackgroundResource(R.drawable.matrix_background);
setBackground(Theme.get(R.drawable.matrix_background));
setFocusable(true);
mLogic = mParent.mLogic;
}
Expand Down
Loading

0 comments on commit fdd7c43

Please sign in to comment.