Java Code Examples for android.preference.PreferenceCategory#setKey()
The following examples show how to use
android.preference.PreferenceCategory#setKey() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SavePasswordsPreferences.java From delion with Apache License 2.0 | 5 votes |
@Override public void passwordListAvailable(int count) { resetList(PREF_CATEGORY_SAVED_PASSWORDS); mNoPasswords = count == 0; if (mNoPasswords) { if (mNoPasswordExceptions) displayEmptyScreenMessage(); return; } displayManageAccountLink(); PreferenceCategory profileCategory = new PreferenceCategory(getActivity()); profileCategory.setKey(PREF_CATEGORY_SAVED_PASSWORDS); profileCategory.setTitle(R.string.section_saved_passwords); profileCategory.setOrder(ORDER_SAVED_PASSWORDS); getPreferenceScreen().addPreference(profileCategory); for (int i = 0; i < count; i++) { PasswordUIView.SavedPasswordEntry saved = mPasswordManagerHandler.getSavedPasswordEntry(i); PreferenceScreen screen = getPreferenceManager().createPreferenceScreen(getActivity()); String url = saved.getUrl(); String name = saved.getUserName(); screen.setTitle(url); screen.setOnPreferenceClickListener(this); screen.setSummary(name); Bundle args = screen.getExtras(); args.putString(PASSWORD_LIST_NAME, name); args.putString(PASSWORD_LIST_URL, url); args.putInt(PASSWORD_LIST_ID, i); profileCategory.addPreference(screen); } }
Example 2
Source File: SavePasswordsPreferences.java From delion with Apache License 2.0 | 5 votes |
@Override public void passwordExceptionListAvailable(int count) { resetList(PREF_CATEGORY_EXCEPTIONS); mNoPasswordExceptions = count == 0; if (mNoPasswordExceptions) { if (mNoPasswords) displayEmptyScreenMessage(); return; } displayManageAccountLink(); PreferenceCategory profileCategory = new PreferenceCategory(getActivity()); profileCategory.setKey(PREF_CATEGORY_EXCEPTIONS); profileCategory.setTitle(R.string.section_saved_passwords_exceptions); profileCategory.setOrder(ORDER_EXCEPTIONS); getPreferenceScreen().addPreference(profileCategory); for (int i = 0; i < count; i++) { String exception = mPasswordManagerHandler.getSavedPasswordException(i); PreferenceScreen screen = getPreferenceManager().createPreferenceScreen(getActivity()); screen.setTitle(exception); screen.setOnPreferenceClickListener(this); Bundle args = screen.getExtras(); args.putString(PASSWORD_LIST_URL, exception); args.putInt(PASSWORD_LIST_ID, i); profileCategory.addPreference(screen); } }
Example 3
Source File: SavePasswordsPreferences.java From AndroidChromium with Apache License 2.0 | 5 votes |
@Override public void passwordListAvailable(int count) { resetList(PREF_CATEGORY_SAVED_PASSWORDS); mNoPasswords = count == 0; if (mNoPasswords) { if (mNoPasswordExceptions) displayEmptyScreenMessage(); return; } displayManageAccountLink(); PreferenceCategory profileCategory = new PreferenceCategory(getActivity()); profileCategory.setKey(PREF_CATEGORY_SAVED_PASSWORDS); profileCategory.setTitle(R.string.section_saved_passwords); profileCategory.setOrder(ORDER_SAVED_PASSWORDS); getPreferenceScreen().addPreference(profileCategory); for (int i = 0; i < count; i++) { PasswordUIView.SavedPasswordEntry saved = mPasswordManagerHandler.getSavedPasswordEntry(i); PreferenceScreen screen = getPreferenceManager().createPreferenceScreen(getActivity()); String url = saved.getUrl(); String name = saved.getUserName(); screen.setTitle(url); screen.setOnPreferenceClickListener(this); screen.setSummary(name); Bundle args = screen.getExtras(); args.putString(PASSWORD_LIST_NAME, name); args.putString(PASSWORD_LIST_URL, url); args.putInt(PASSWORD_LIST_ID, i); profileCategory.addPreference(screen); } }
Example 4
Source File: SavePasswordsPreferences.java From AndroidChromium with Apache License 2.0 | 5 votes |
@Override public void passwordExceptionListAvailable(int count) { resetList(PREF_CATEGORY_EXCEPTIONS); mNoPasswordExceptions = count == 0; if (mNoPasswordExceptions) { if (mNoPasswords) displayEmptyScreenMessage(); return; } displayManageAccountLink(); PreferenceCategory profileCategory = new PreferenceCategory(getActivity()); profileCategory.setKey(PREF_CATEGORY_EXCEPTIONS); profileCategory.setTitle(R.string.section_saved_passwords_exceptions); profileCategory.setOrder(ORDER_EXCEPTIONS); getPreferenceScreen().addPreference(profileCategory); for (int i = 0; i < count; i++) { String exception = mPasswordManagerHandler.getSavedPasswordException(i); PreferenceScreen screen = getPreferenceManager().createPreferenceScreen(getActivity()); screen.setTitle(exception); screen.setOnPreferenceClickListener(this); Bundle args = screen.getExtras(); args.putString(PASSWORD_LIST_URL, exception); args.putInt(PASSWORD_LIST_ID, i); profileCategory.addPreference(screen); } }
Example 5
Source File: SavePasswordsPreferences.java From 365browser with Apache License 2.0 | 5 votes |
@Override public void passwordListAvailable(int count) { resetList(PREF_CATEGORY_SAVED_PASSWORDS); resetList(PREF_CATEGORY_SAVED_PASSWORDS_NO_TEXT); mNoPasswords = count == 0; if (mNoPasswords) { if (mNoPasswordExceptions) displayEmptyScreenMessage(); return; } displayManageAccountLink(); PreferenceCategory profileCategory = new PreferenceCategory(getActivity()); profileCategory.setKey(PREF_CATEGORY_SAVED_PASSWORDS); profileCategory.setTitle(R.string.section_saved_passwords); profileCategory.setOrder(ORDER_SAVED_PASSWORDS); getPreferenceScreen().addPreference(profileCategory); for (int i = 0; i < count; i++) { PasswordUIView.SavedPasswordEntry saved = mPasswordManagerHandler.getSavedPasswordEntry(i); PreferenceScreen screen = getPreferenceManager().createPreferenceScreen(getActivity()); String url = saved.getUrl(); String name = saved.getUserName(); screen.setTitle(url); screen.setOnPreferenceClickListener(this); screen.setSummary(name); Bundle args = screen.getExtras(); args.putString(PASSWORD_LIST_NAME, name); args.putString(PASSWORD_LIST_URL, url); args.putInt(PASSWORD_LIST_ID, i); profileCategory.addPreference(screen); } }
Example 6
Source File: SavePasswordsPreferences.java From 365browser with Apache License 2.0 | 5 votes |
@Override public void passwordExceptionListAvailable(int count) { resetList(PREF_CATEGORY_EXCEPTIONS); resetList(PREF_CATEGORY_SAVED_PASSWORDS_NO_TEXT); mNoPasswordExceptions = count == 0; if (mNoPasswordExceptions) { if (mNoPasswords) displayEmptyScreenMessage(); return; } displayManageAccountLink(); PreferenceCategory profileCategory = new PreferenceCategory(getActivity()); profileCategory.setKey(PREF_CATEGORY_EXCEPTIONS); profileCategory.setTitle(R.string.section_saved_passwords_exceptions); profileCategory.setOrder(ORDER_EXCEPTIONS); getPreferenceScreen().addPreference(profileCategory); for (int i = 0; i < count; i++) { String exception = mPasswordManagerHandler.getSavedPasswordException(i); PreferenceScreen screen = getPreferenceManager().createPreferenceScreen(getActivity()); screen.setTitle(exception); screen.setOnPreferenceClickListener(this); Bundle args = screen.getExtras(); args.putString(PASSWORD_LIST_URL, exception); args.putInt(PASSWORD_LIST_ID, i); profileCategory.addPreference(screen); } }