linphone-developers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Linphone-developers] How to remove a preference from a PreferenceGroup


From: Vinh Đặng
Subject: [Linphone-developers] How to remove a preference from a PreferenceGroup
Date: Wed, 30 Jul 2014 11:32:51 +0200

Hello all,

In AccountPreferencesFragment.java, I see the code


​"
PreferenceCategory account = (PreferenceCategory) getPreferenceScreen().findPreference(getString(R.string.pref_sipaccount_key));
    EditTextPreference username = (EditTextPreference) account.getPreference(0);
    username.setText(mPrefs.getAccountUsername(n));
    username.getEditText().setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS);
    username.setOnPreferenceChangeListener(usernameChangedListener);
    username.setSummary(username.getText());
"​

​I tried to hide a preference, by calling:

"
account.removePreference (username);
"​

but the app will crash when I open Account Preference screen.

Could you give me a hint? 

Thank you very much


----------------------------------
Best Regards
 
Vinh Dang


reply via email to

[Prev in Thread] Current Thread [Next in Thread]