From: David A. Velasco Date: Wed, 5 Jun 2013 09:39:34 +0000 (+0200) Subject: Merge branch 'login_view_layout_improvements' into login_toggle_password_icon X-Git-Tag: oc-android-1.4.3~16^2~1^2^2 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/dcae1fe167dac9a69102a0714fcd38a56340a332?hp=6daba6801f9c79a7cca612ec3987cdfb95f6046d Merge branch 'login_view_layout_improvements' into login_toggle_password_icon --- diff --git a/.classpath b/.classpath index f7b8a1f9..d57ec025 100644 --- a/.classpath +++ b/.classpath @@ -4,6 +4,6 @@ - + diff --git a/res/drawable/ic_hide.png b/res/drawable/ic_hide.png new file mode 100644 index 00000000..8a8144b5 Binary files /dev/null and b/res/drawable/ic_hide.png differ diff --git a/res/drawable/ic_view.png b/res/drawable/ic_view.png new file mode 100644 index 00000000..b57c2499 Binary files /dev/null and b/res/drawable/ic_view.png differ 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; diff --git a/tests/.classpath b/tests/.classpath index 0331c0e2..59401260 100644 --- a/tests/.classpath +++ b/tests/.classpath @@ -2,8 +2,8 @@ - - + +