Settings: Correctly align cursor in Settings
Steps to Reproduce: - Click on Density Settings (DPI Settings) / Renaming BT Device / Renaming SIM Settings - EditText Dialog pops up - The cursor is at the leftmost side of the text - Logically Cursor should be at rightmost side which can be aligned grabbing text length Screenshots: Before: http://imgur.com/a/o4vkr http://imgur.com/a/6Qext After: http://imgur.com/a/fuxqT http://imgur.com/a/vm2WX Bug: 65185652 Test: RunSettingsRoboTests: OK (47 tests) Change-Id: Id00308e7e019434edad4afab56cf4719be0d0d54 Signed-off-by: PMS22 <prathams99@rediff.com>
This commit is contained in:
@@ -103,6 +103,7 @@ import android.view.ViewGroup;
|
||||
import android.view.animation.Animation;
|
||||
import android.view.animation.Animation.AnimationListener;
|
||||
import android.view.animation.AnimationUtils;
|
||||
import android.widget.EditText;
|
||||
import android.widget.ListView;
|
||||
import android.widget.TabWidget;
|
||||
|
||||
@@ -1362,4 +1363,7 @@ public final class Utils extends com.android.settingslib.Utils {
|
||||
&& volume.isMountedReadable();
|
||||
}
|
||||
|
||||
public static void setEditTextCursorPosition(EditText editText) {
|
||||
editText.setSelection(editText.getText().length());
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user