Remove dep from AngleUnitButton

This commit is contained in:
serso 2016-02-28 13:55:38 +01:00
parent 3edaa64d2d
commit 8a2456d9a4
2 changed files with 2 additions and 3 deletions

View File

@ -139,6 +139,7 @@ public class KeyboardUi extends BaseKeyboardUi {
prepareButton(button4);
prepareButton(button5);
prepareButton(button6);
button6.setAngleUnit(angleUnit.getPreference(preferences));
prepareButton(button7);
prepareButton(button8);
prepareButton(button9);

View File

@ -28,7 +28,6 @@ import android.support.v4.content.ContextCompat;
import android.text.TextPaint;
import android.util.AttributeSet;
import jscl.AngleUnit;
import org.solovyev.android.calculator.Locator;
import org.solovyev.android.calculator.R;
import org.solovyev.android.views.dragbutton.DirectionDragButton;
@ -37,11 +36,10 @@ import javax.annotation.Nonnull;
public class AngleUnitsButton extends DirectionDragButton {
@Nonnull
private AngleUnit angleUnit;
private AngleUnit angleUnit = AngleUnit.deg;
public AngleUnitsButton(Context context, @Nonnull AttributeSet attrs) {
super(context, attrs);
this.angleUnit = Locator.getInstance().getEngine().getMathEngine().getAngleUnits();
}
@Override