diff options
author | Jean Chalard <jchalard@google.com> | 2012-05-08 20:25:00 +0900 |
---|---|---|
committer | Jean Chalard <jchalard@google.com> | 2012-05-09 17:50:18 +0900 |
commit | ac499c34fe99740760f729ec24f487a99028fd08 (patch) | |
tree | 01b7636be8ec545da2ecfd3b6b0a62cb5cfc4457 /src/com/android/settings/inputmethod | |
parent | a0868ffd5ddcb1fa23c5b6e4b1043e40611bbd34 (diff) | |
download | packages_apps_settings-ac499c34fe99740760f729ec24f487a99028fd08.zip packages_apps_settings-ac499c34fe99740760f729ec24f487a99028fd08.tar.gz packages_apps_settings-ac499c34fe99740760f729ec24f487a99028fd08.tar.bz2 |
Remove the useless parts in the 'add word' dialog.
Bug: 6026080
Change-Id: Ic2bf6dcfc2abfe5fc07759530042299cc6a0b503
Diffstat (limited to 'src/com/android/settings/inputmethod')
-rw-r--r-- | src/com/android/settings/inputmethod/UserDictionaryAddWordActivity.java | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/src/com/android/settings/inputmethod/UserDictionaryAddWordActivity.java b/src/com/android/settings/inputmethod/UserDictionaryAddWordActivity.java index 0190f0d..4dd9e00 100644 --- a/src/com/android/settings/inputmethod/UserDictionaryAddWordActivity.java +++ b/src/com/android/settings/inputmethod/UserDictionaryAddWordActivity.java @@ -41,18 +41,8 @@ public class UserDictionaryAddWordActivity extends Activity { public static final String MODE_EDIT_ACTION = "com.android.settings.USER_DICTIONARY_EDIT"; public static final String MODE_INSERT_ACTION = "com.android.settings.USER_DICTIONARY_INSERT"; - private static final int[] IDS_SHOWN_ONLY_IN_MORE_OPTIONS_MODE = { - R.id.user_dictionary_add_word_label, - R.id.user_dictionary_add_shortcut_label, - R.id.user_dictionary_add_locale_label, - R.id.user_dictionary_settings_add_dialog_shortcut, - R.id.user_dictionary_settings_add_dialog_locale, - }; - private UserDictionaryAddWordContents mContents; - private boolean mIsShowingMoreOptions = false; - @Override public void onCreate(final Bundle savedInstanceState) { super.onCreate(savedInstanceState); @@ -76,30 +66,15 @@ public class UserDictionaryAddWordActivity extends Activity { args.putInt(UserDictionaryAddWordContents.EXTRA_MODE, mode); if (null != savedInstanceState) { - mIsShowingMoreOptions = - savedInstanceState.getBoolean(STATE_KEY_IS_OPEN, mIsShowingMoreOptions); // Override options if we have a saved state. args.putAll(savedInstanceState); } mContents = new UserDictionaryAddWordContents(getWindow().getDecorView(), args); - - if (mIsShowingMoreOptions) { - onClickMoreOptions(findViewById(R.id.user_dictionary_settings_add_dialog_more_options)); - } - - // TODO: The following code enables layout transition for eye-candy, but there is still - // a jankiness issue with the window moving on one frame, resizing suddenly on the next, - // and animation only starting afterwards on children. - final ViewGroup v = (ViewGroup)findViewById(R.id.user_dictionary_add_word_grid); - final LayoutTransition transition = new LayoutTransition(); - transition.setStartDelay(LayoutTransition.APPEARING, 0); - v.setLayoutTransition(transition); } @Override public void onSaveInstanceState(final Bundle outState) { - outState.putBoolean(STATE_KEY_IS_OPEN, mIsShowingMoreOptions); outState.putString( UserDictionaryAddWordContents.EXTRA_WORD, mContents.mEditText.getText().toString()); outState.putString(UserDictionaryAddWordContents.EXTRA_LOCALE, mContents.mLocale); @@ -113,29 +88,4 @@ public class UserDictionaryAddWordActivity extends Activity { mContents.apply(this); finish(); } - - public void onClickMoreOptions(final View v) { - for (final int idToShow : IDS_SHOWN_ONLY_IN_MORE_OPTIONS_MODE) { - final View viewToShow = findViewById(idToShow); - viewToShow.setVisibility(View.VISIBLE); - } - findViewById(R.id.user_dictionary_settings_add_dialog_more_options) - .setVisibility(View.GONE); - findViewById(R.id.user_dictionary_settings_add_dialog_less_options) - .setVisibility(View.VISIBLE); - - mIsShowingMoreOptions = true; - } - - public void onClickLessOptions(final View v) { - for (final int idToHide : IDS_SHOWN_ONLY_IN_MORE_OPTIONS_MODE) { - final View viewToHide = findViewById(idToHide); - viewToHide.setVisibility(View.GONE); - } - findViewById(R.id.user_dictionary_settings_add_dialog_more_options) - .setVisibility(View.VISIBLE); - findViewById(R.id.user_dictionary_settings_add_dialog_less_options) - .setVisibility(View.GONE); - mIsShowingMoreOptions = false; - } } |