From: David A. Velasco Date: Tue, 5 May 2015 08:28:49 +0000 (+0200) Subject: Removed unneeded toggling on 'selected' state X-Git-Tag: test~19^2~6 X-Git-Url: http://git.linex4red.de/pub/Android/ownCloud.git/commitdiff_plain/930d21dc938d37fb4d4bb7baaa7ae26dc445c683?ds=inline;hp=-c Removed unneeded toggling on 'selected' state --- 930d21dc938d37fb4d4bb7baaa7ae26dc445c683 diff --git a/src/com/owncloud/android/ui/activity/PassCodeActivity.java b/src/com/owncloud/android/ui/activity/PassCodeActivity.java index 1eb7f8be..cc524b41 100644 --- a/src/com/owncloud/android/ui/activity/PassCodeActivity.java +++ b/src/com/owncloud/android/ui/activity/PassCodeActivity.java @@ -175,10 +175,10 @@ public class PassCodeActivity extends SherlockFragmentActivity { public void onFocusChange(View v, boolean hasFocus) { /// TODO WIP: should take advantage of hasFocus to reduce processing if (mPassCodeEditTexts[0].getText().toString().equals("")) { // TODO WIP validation could be done in a global way, with a single OnFocusChangeListener for all the input fields - mPassCodeEditTexts[1].setSelected(false); + //mPassCodeEditTexts[1].setSelected(false); mPassCodeEditTexts[0].requestFocus(); - mPassCodeEditTexts[0].setSelected(true); // TODO WIP really needed? is it for the colour highlight - mPassCodeEditTexts[0].setSelection(0); // TODO WIP what is THIS for? + //mPassCodeEditTexts[0].setSelected(true); // TODO WIP really needed? is it for the colour highlight + //mPassCodeEditTexts[0].setSelection(0); // TODO WIP what is THIS for? } } @@ -214,15 +214,15 @@ public class PassCodeActivity extends SherlockFragmentActivity { @Override public void onFocusChange(View v, boolean hasFocus) { if (mPassCodeEditTexts[0].getText().toString().equals("")) { - mPassCodeEditTexts[2].setSelected(false); + //mPassCodeEditTexts[2].setSelected(false); mPassCodeEditTexts[0].requestFocus(); - mPassCodeEditTexts[0].setSelected(true); - mPassCodeEditTexts[0].setSelection(0); + //mPassCodeEditTexts[0].setSelected(true); + //mPassCodeEditTexts[0].setSelection(0); } else if (mPassCodeEditTexts[1].getText().toString().equals("")) { - mPassCodeEditTexts[2].setSelected(false); + //mPassCodeEditTexts[2].setSelected(false); mPassCodeEditTexts[1].requestFocus(); - mPassCodeEditTexts[1].setSelected(true); - mPassCodeEditTexts[1].setSelection(0); + //mPassCodeEditTexts[1].setSelected(true); + //mPassCodeEditTexts[1].setSelection(0); } } @@ -258,20 +258,20 @@ public class PassCodeActivity extends SherlockFragmentActivity { public void onFocusChange(View v, boolean hasFocus) { if (mPassCodeEditTexts[0].getText().toString().equals("")) { - mPassCodeEditTexts[3].setSelected(false); + //mPassCodeEditTexts[3].setSelected(false); mPassCodeEditTexts[0].requestFocus(); - mPassCodeEditTexts[0].setSelected(true); - mPassCodeEditTexts[0].setSelection(0); + //mPassCodeEditTexts[0].setSelected(true); + //mPassCodeEditTexts[0].setSelection(0); } else if (mPassCodeEditTexts[1].getText().toString().equals("")) { - mPassCodeEditTexts[3].setSelected(false); + //mPassCodeEditTexts[3].setSelected(false); mPassCodeEditTexts[1].requestFocus(); - mPassCodeEditTexts[1].setSelected(true); - mPassCodeEditTexts[1].setSelection(0); + //mPassCodeEditTexts[1].setSelected(true); + //mPassCodeEditTexts[1].setSelection(0); } else if (mPassCodeEditTexts[2].getText().toString().equals("")) { - mPassCodeEditTexts[3].setSelected(false); + //mPassCodeEditTexts[3].setSelected(false); mPassCodeEditTexts[2].requestFocus(); - mPassCodeEditTexts[2].setSelected(true); - mPassCodeEditTexts[2].setSelection(0); + //mPassCodeEditTexts[2].setSelected(true); + //mPassCodeEditTexts[2].setSelection(0); } }