Merge "Right align pwd field when space is tight" into rvc-dev am: b157e3cef4 am: aed8718f87

Change-Id: I0cb1e39819e01faa58fdc5207a6a2a205a5126c8
This commit is contained in:
Lucas Dupin
2020-04-21 20:54:16 +00:00
committed by Automerger Merge Worker

View File

@@ -164,7 +164,9 @@ public class PasswordTextView extends View {
currentDrawPosition = getPaddingLeft(); currentDrawPosition = getPaddingLeft();
} }
} else { } else {
currentDrawPosition = getWidth() / 2 - totalDrawingWidth / 2; float maxRight = getWidth() - getPaddingRight() - totalDrawingWidth;
float center = getWidth() / 2f - totalDrawingWidth / 2f;
currentDrawPosition = center > 0 ? center : maxRight;
} }
int length = mTextChars.size(); int length = mTextChars.size();
Rect bounds = getCharBounds(); Rect bounds = getCharBounds();