Merge "Fix bug #13727850 Input values are not visible when setting up the lockscreen... ...security(PIN/Passwor/Pattern)."
This commit is contained in:
committed by
Android (Google) Code Review
commit
a780d9323b
@@ -32,6 +32,7 @@ import android.os.Parcel;
|
||||
import android.os.Parcelable;
|
||||
import android.os.SystemClock;
|
||||
import android.util.AttributeSet;
|
||||
import android.util.TypedValue;
|
||||
import android.view.HapticFeedbackConstants;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.View;
|
||||
@@ -260,13 +261,23 @@ public class LockPatternView extends View {
|
||||
|
||||
mPathPaint.setAntiAlias(true);
|
||||
mPathPaint.setDither(true);
|
||||
mPathPaint.setColor(Color.WHITE); // TODO this should be from the style
|
||||
|
||||
int defaultColor = Color.WHITE;
|
||||
TypedValue outValue = new TypedValue();
|
||||
if (context.getTheme().resolveAttribute(android.R.attr.textColorPrimary, outValue, true)) {
|
||||
defaultColor = context.getResources().getColor(outValue.resourceId);
|
||||
}
|
||||
|
||||
final int color = a.getColor(R.styleable.LockPatternView_pathColor, defaultColor);
|
||||
mPathPaint.setColor(color);
|
||||
|
||||
mPathPaint.setAlpha(mStrokeAlpha);
|
||||
mPathPaint.setStyle(Paint.Style.STROKE);
|
||||
mPathPaint.setStrokeJoin(Paint.Join.ROUND);
|
||||
mPathPaint.setStrokeCap(Paint.Cap.ROUND);
|
||||
|
||||
// lot's of bitmaps!
|
||||
// TODO: those bitmaps are hardcoded to the Holo Theme which should not be the case!
|
||||
mBitmapBtnDefault = getBitmapFor(R.drawable.btn_code_lock_default_holo);
|
||||
mBitmapBtnTouched = getBitmapFor(R.drawable.btn_code_lock_touched_holo);
|
||||
mBitmapCircleDefault = getBitmapFor(R.drawable.indicator_code_lock_point_area_default_holo);
|
||||
|
||||
@@ -6138,6 +6138,8 @@
|
||||
<!-- Aspect to use when drawing LockPatternView. Choices are "square"(default), "lock_width"
|
||||
or "lock_height" -->
|
||||
<attr name="aspect" format="string" />
|
||||
<!-- Color to use when drawing LockPatternView paths. -->
|
||||
<attr name="pathColor" format="color|reference" />
|
||||
</declare-styleable>
|
||||
|
||||
<!-- Use <code>recognition-service</code> as the root tag of the XML resource that
|
||||
|
||||
Reference in New Issue
Block a user