Thanks Justin Anderson,
but when in our class which does not extend any activity thenh we can write
any control like

((Activity) context).findviewbyid(R.id.button1);
Thats way i want to write this addprefernce.. line.






On Tue, Mar 27, 2012 at 9:34 PM, Justin Anderson <[email protected]>wrote:

> hello all i want to write addPreferencesFromResource(R.xml.preferences);
>>  in class file that does not extend prefercneceactivity
>>
>
>    1. That method is deprecated... are you sure you want to use that?
>    2. That method is part of the PreferenceActivity class... Therefore,
>    you can't use it outside of that class
>
> so how can i write that?
>>
> Well, you would write it like this:
> "addPreferencesFromResource(R.xml.preferences);"  But it won't compile
> unless you are in a PreferenceActivity
>
> Thanks,
> Justin Anderson
> MagouyaWare Developer
> http://sites.google.com/site/magouyaware
>
>
>
> On Mon, Mar 26, 2012 at 6:04 AM, jugni <[email protected]> wrote:
>
>> hello all i want to write
>> addPreferencesFromResource(R.xml.preferences);  in class file that
>> does not extend prefercneceactivity.so how can i write that?
>>
>> --
>> You received this message because you are subscribed to the Google
>> Groups "Android Developers" group.
>> To post to this group, send email to [email protected]
>> To unsubscribe from this group, send email to
>> [email protected]
>> For more options, visit this group at
>> http://groups.google.com/group/android-developers?hl=en
>
>
>  --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Regards
jagruti Sangani
*iNextrix Technologies*

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

Reply via email to