Friday, March 28, 2014

How to make a preference PreferenceScreen class grayed out?


Hello everyone, younger brother to ask questions.
PreferenceScreen class has removePreference () method can delete a preference it contains, but how to make this preference is grayed out and not be deleted, because I think we can click only under certain conditions.
Thank you!
<-! Main posts under Banner (D4) -><-! Posts under the main text (D5) ->
Reply:
PreferenceCategory can tune setEnable method ah
Reply:
cited a floor guoyoulei520 reply:
PreferenceCategory can tune setEnable method ah

Thank you!
I want to mUplmnPreference corresponding menu grayed out. Found:
(1) Use prefSet.removePreference (mUplmnPreference); remove the corresponding menu can be mUplmnPreference out, this is no problem.
(2) but with mUplmnPreference.setEnabled (false); find mUplmnPreference corresponding menu can also be used normally, without being grayed out.

Reply:
reply lion7beckham second floor of references:
Quote: references to a floor guoyoulei520 reply:

PreferenceCategory can tune setEnable method ah

Thank you!
I want to mUplmnPreference corresponding menu grayed out. Found:
(1) Use prefSet.removePreference (mUplmnPreference); remove the corresponding menu can be mUplmnPreference out, this is no problem.
(2) but with mUplmnPreference.setEnabled (false); find mUplmnPreference corresponding menu can also be used normally, without being grayed out.

mUplmnPreference what object, this should be for each of the
Reply:
mUplmnPreference I dimmed the corresponding menu.
I, I can now be deleted, but it can not be dimmed. . .
Reply:
reference to the third floor guoyoulei520 reply:
Quote: references to the second floor lion7beckham reply:

Quote: references to a floor guoyoulei520 reply:

PreferenceCategory can tune setEnable method ah

Thank you!
I want to mUplmnPreference corresponding menu grayed out. Found:
(1) Use prefSet.removePreference (mUplmnPreference); remove the corresponding menu can be mUplmnPreference out, this is no problem.
(2) but with mUplmnPreference.setEnabled (false); find mUplmnPreference corresponding menu can also be used normally, without being grayed out.

mUplmnPreference what object, this should be for each of

Function of this menu is the "UPLMN setting."
Reply:
mUplmnPreference is so come:
mUplmnPreference = prefSet.findPreference (UPLMN_KEY);

No comments:

Post a Comment