rad/degrees

This commit is contained in:
serso
2011-11-22 23:56:46 +04:00
parent b140551487
commit 89cacd750f
11 changed files with 345 additions and 48 deletions

View File

@@ -1,3 +1,9 @@
/*
* Copyright (c) 2009-2011. Created by serso aka se.solovyev.
* For more information, please, contact se.solovyev@gmail.com
* or visit http://se.solovyev.org
*/
package org.solovyev.android.view.widgets;
import android.content.Context;
@@ -32,6 +38,7 @@ public class AngleUnitsButton extends DirectionDragButton {
result.setColor(resources.getColor(R.color.selected_angle_unit_text_color));
} else {
result.setColor(resources.getColor(R.color.default_text_color));
result.setAlpha(getDefaultDirectionTextAlpha());
}
}

View File

@@ -188,12 +188,16 @@ public class DirectionDragButton extends DragButton {
private static TextPaint getUpDownTextPaint(@NotNull Paint basePaint, @NotNull Resources resources, @NotNull Float directionTextScale) {
final TextPaint result = new TextPaint(basePaint);
result.setColor(resources.getColor(R.color.button_text_color));
result.setAlpha(150);
result.setAlpha(getDefaultDirectionTextAlpha());
result.setTextSize(basePaint.getTextSize() * directionTextScale);
return result;
}
protected static int getDefaultDirectionTextAlpha() {
return 150;
}
@Nullable
public String getTextUp() {
return textUp;