google-developer-training / android-advanced

Solution apps for the apps that students create as they work through the Advanced Android Development training course created by Google Developer Training.
Other
1.14k stars 1.09k forks source link

Bug in CustomEditText Touch Listener #5

Open pazhamalai opened 5 years ago

pazhamalai commented 5 years ago

if (getLayoutDirection() == LAYOUT_DIRECTION_RTL) { // If RTL, get the end of the button on the left side. clearButtonEnd = mClearButtonImage .getIntrinsicWidth() + getPaddingStart();

This line comes from the implementation of touch listener in EditTextWithClear file. If the layout direction is RTL, the getPaddingEnd() should be used instead of getPaddingStart(). In RTL, getPaddingStart will give padding on the right side and getPaddingEnd will give padding on the left side.

MonikaJethani commented 5 years ago

@aleksinthecloud Can I work on this?