Saturday, August 7, 2010

[android-developers] Re: remove checkboxpreference in preferencescreen

Hi,
Your requirement is not quite clear. You need to put some light on it.

What I understood is, you have an XML, where you have defined some
preferences. Then, you show them in a PreferenceActivity (using
addPreferencesFromResource).
Now, there is one checkbox type preference, which you dont want your
user to be able to change.

I am assuming that you are willing to change that preference from code
(otherwise, how is it going to be changed?)

So, just remove that checkbox preference from your XML. Then, your
user will not able to see it.

Then, add/read/modify that preference from code.
In preferences, there is an edit() method, which return an Editor. You
can incove putBoolean(String key, boolean value) on the Editor to add
a key-value.
Dont forget to call commit().


Regards
Sarwar Erfan


On Aug 6, 11:59 pm, booooooooooooo <yada...@gmail.com> wrote:
> hi
> everybody
>
> this is vinod i have a problem with my requirement   pleas help me
>
> my  problem is :
>  i need to invisible  checkboxpreference in run time ,how could i
> solve this one
> basically we have no option to invisible in checkboxpreference
>
> please help me any one
>
> rearding ..
> vinod

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate