Home page preference URL input now selects all
Bug: 3312287
This changes it so that when the home page preference dialog pops up
rather than the cursor being at the beggining of the URL all the
text is selected. This matches the behavior of the URL input in the
browser.
Change-Id: I71658f51bc7a8da1fa770d0beb9de281aefe9efa
diff --git a/src/com/android/browser/BrowserHomepagePreference.java b/src/com/android/browser/BrowserHomepagePreference.java
index 80f7ec2..1e2697b 100644
--- a/src/com/android/browser/BrowserHomepagePreference.java
+++ b/src/com/android/browser/BrowserHomepagePreference.java
@@ -16,9 +16,7 @@
package com.android.browser;
-import android.app.AlertDialog;
import android.content.Context;
-import android.content.DialogInterface;
import android.os.Bundle;
import android.preference.EditTextPreference;
import android.util.AttributeSet;
@@ -50,6 +48,7 @@
protected void onAddEditTextToDialogView(View dialogView,
EditText editText) {
super.onAddEditTextToDialogView(dialogView, editText);
+ editText.setSelectAllOnFocus(true);
// Now the EditText has a parent. Add a button to set to the current
// page.
createButtons((ViewGroup) editText.getParent());