From: David A. Velasco Date: Fri, 24 May 2013 08:36:21 +0000 (+0200) Subject: Merge branch 'develop' into login_toggle_password_icon X-Git-Tag: oc-android-1.4.3~16^2~1^2^2~3 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/7160a49e20c34b3ee34105526eed50e124979834?hp=b8b60d844fa6922bef06c2274902bcc48d715c41 Merge branch 'develop' into login_toggle_password_icon --- diff --git a/res/layout-land/account_setup.xml b/res/layout-land/account_setup.xml index b8b8b534..dea86cd9 100644 --- a/res/layout-land/account_setup.xml +++ b/res/layout-land/account_setup.xml @@ -122,28 +122,16 @@ android:hint="@string/auth_username" android:inputType="textNoSuggestions" /> - - - - - - + android:ems="10" + android:hint="@string/auth_password" + android:inputType="textPassword" + android:drawablePadding="5dp" + /> + - - - - - - - + + 2) { - rightDrawable = drawables[2]; - } + Drawable rightDrawable = null; + if (view instanceof TextView) { + Drawable[] drawables = ((TextView)view).getCompoundDrawables(); + if (drawables.length > 2) { + rightDrawable = drawables[2]; } - if (rightDrawable != null) { - final int x = (int) event.getX(); - final int y = (int) event.getY(); - final Rect bounds = rightDrawable.getBounds(); - if (x >= (view.getRight() - bounds.width() - fuzz) && x <= (view.getRight() - view.getPaddingRight() + fuzz) - && y >= (view.getPaddingTop() - fuzz) && y <= (view.getHeight() - view.getPaddingBottom()) + fuzz) { - - return onDrawableTouch(event); - } + } + if (rightDrawable != null) { + final int x = (int) event.getX(); + final int y = (int) event.getY(); + final Rect bounds = rightDrawable.getBounds(); + if (x >= (view.getRight() - bounds.width() - fuzz) && x <= (view.getRight() - view.getPaddingRight() + fuzz) + && y >= (view.getPaddingTop() - fuzz) && y <= (view.getHeight() - view.getPaddingBottom()) + fuzz) { + + return onDrawableTouch(event); } } return false;