summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/inputmethod/UserDictionaryAddWordActivity.java
diff options
context:
space:
mode:
authorJean Chalard <jchalard@google.com>2012-05-08 20:08:39 +0900
committerJean Chalard <jchalard@google.com>2012-05-09 17:50:14 +0900
commita0868ffd5ddcb1fa23c5b6e4b1043e40611bbd34 (patch)
tree99efb34a0b9ccc294fe9896dc53cb3b4be9dec6c /src/com/android/settings/inputmethod/UserDictionaryAddWordActivity.java
parentf54622e46c9164e4ab46c09c9c3ff173828d5940 (diff)
downloadpackages_apps_settings-a0868ffd5ddcb1fa23c5b6e4b1043e40611bbd34.zip
packages_apps_settings-a0868ffd5ddcb1fa23c5b6e4b1043e40611bbd34.tar.gz
packages_apps_settings-a0868ffd5ddcb1fa23c5b6e4b1043e40611bbd34.tar.bz2
Move the spinner code to the fragment.
Bug: 6026080 Change-Id: I49e1aa1839266ca169982b6a4800ee9923451be5
Diffstat (limited to 'src/com/android/settings/inputmethod/UserDictionaryAddWordActivity.java')
-rw-r--r--src/com/android/settings/inputmethod/UserDictionaryAddWordActivity.java30
1 files changed, 1 insertions, 29 deletions
diff --git a/src/com/android/settings/inputmethod/UserDictionaryAddWordActivity.java b/src/com/android/settings/inputmethod/UserDictionaryAddWordActivity.java
index 087574e..0190f0d 100644
--- a/src/com/android/settings/inputmethod/UserDictionaryAddWordActivity.java
+++ b/src/com/android/settings/inputmethod/UserDictionaryAddWordActivity.java
@@ -21,7 +21,6 @@ import com.android.settings.UserDictionarySettings;
import com.android.settings.Utils;
import com.android.settings.inputmethod.UserDictionaryAddWordContents.LocaleRenderer;
-import java.util.ArrayList;
import java.util.Locale;
import android.animation.LayoutTransition;
@@ -33,13 +32,9 @@ import android.provider.UserDictionary;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewGroup;
-import android.widget.AdapterView;
-import android.widget.ArrayAdapter;
import android.widget.EditText;
-import android.widget.Spinner;
-public class UserDictionaryAddWordActivity extends Activity
- implements AdapterView.OnItemSelectedListener {
+public class UserDictionaryAddWordActivity extends Activity {
private static final String STATE_KEY_IS_OPEN = "isOpen";
@@ -129,15 +124,6 @@ public class UserDictionaryAddWordActivity extends Activity
findViewById(R.id.user_dictionary_settings_add_dialog_less_options)
.setVisibility(View.VISIBLE);
- final ArrayList<LocaleRenderer> localesList = mContents.getLocalesList(this);
-
- final Spinner localeSpinner =
- (Spinner)findViewById(R.id.user_dictionary_settings_add_dialog_locale);
- final ArrayAdapter<LocaleRenderer> adapter = new ArrayAdapter<LocaleRenderer>(this,
- android.R.layout.simple_spinner_item, localesList);
- adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
- localeSpinner.setAdapter(adapter);
- localeSpinner.setOnItemSelectedListener(this);
mIsShowingMoreOptions = true;
}
@@ -152,18 +138,4 @@ public class UserDictionaryAddWordActivity extends Activity
.setVisibility(View.GONE);
mIsShowingMoreOptions = false;
}
-
- @Override
- public void onItemSelected(final AdapterView<?> parent, final View view, final int pos,
- final long id) {
- final LocaleRenderer locale = (LocaleRenderer)parent.getItemAtPosition(pos);
- mContents.updateLocale(locale.getLocaleString());
- }
-
- @Override
- public void onNothingSelected(AdapterView<?> parent) {
- // I'm not sure we can come here, but if we do, that's the right thing to do.
- final Intent intent = getIntent();
- mContents.updateLocale(intent.getStringExtra(UserDictionaryAddWordContents.EXTRA_LOCALE));
- }
}