Merge "Fixed PIN entry detecting gravity improperly" into nyc-dev
This commit is contained in:
@@ -148,8 +148,9 @@ public class PasswordTextView extends View {
|
|||||||
protected void onDraw(Canvas canvas) {
|
protected void onDraw(Canvas canvas) {
|
||||||
float totalDrawingWidth = getDrawingWidth();
|
float totalDrawingWidth = getDrawingWidth();
|
||||||
float currentDrawPosition;
|
float currentDrawPosition;
|
||||||
if ((mGravity & Gravity.START) != 0) {
|
if ((mGravity & Gravity.HORIZONTAL_GRAVITY_MASK) == Gravity.LEFT) {
|
||||||
if (getLayoutDirection() == LAYOUT_DIRECTION_RTL) {
|
if ((mGravity & Gravity.RELATIVE_LAYOUT_DIRECTION) != 0
|
||||||
|
&& getLayoutDirection() == LAYOUT_DIRECTION_RTL) {
|
||||||
currentDrawPosition = getWidth() - getPaddingRight() - totalDrawingWidth;
|
currentDrawPosition = getWidth() - getPaddingRight() - totalDrawingWidth;
|
||||||
} else {
|
} else {
|
||||||
currentDrawPosition = getPaddingLeft();
|
currentDrawPosition = getPaddingLeft();
|
||||||
@@ -163,7 +164,7 @@ public class PasswordTextView extends View {
|
|||||||
float yPosition =
|
float yPosition =
|
||||||
(getHeight() - getPaddingBottom() - getPaddingTop()) / 2 + getPaddingTop();
|
(getHeight() - getPaddingBottom() - getPaddingTop()) / 2 + getPaddingTop();
|
||||||
canvas.clipRect(getPaddingLeft(), getPaddingTop(),
|
canvas.clipRect(getPaddingLeft(), getPaddingTop(),
|
||||||
getWidth()-getPaddingRight(), getHeight()-getPaddingBottom());
|
getWidth() - getPaddingRight(), getHeight() - getPaddingBottom());
|
||||||
float charLength = bounds.right - bounds.left;
|
float charLength = bounds.right - bounds.left;
|
||||||
for (int i = 0; i < length; i++) {
|
for (int i = 0; i < length; i++) {
|
||||||
CharState charState = mTextChars.get(i);
|
CharState charState = mTextChars.get(i);
|
||||||
|
|||||||
Reference in New Issue
Block a user