Hello All,
I am getting some strange problem.
I am having one
class ABC extends PreferenceCategory .. and this ABC class is added in
preference xml and drawing the UI from that XML.
Now based on events i am adding and removing the children Preference from
the PreferenceCategory(ABC).
Like
ABC abc = new ABC(); // this is PreferenceCategory
// based on events
Preference myPref = new Preference();
abc.addPreference(myPref);
*or*
abc.removePreference(myPref);
this all works fine. But when i added my class which is extending the
Preference .
*
public* *class* MyClass *extends* Preference{
*public* MyClass(Context context) {
* super*(context);
}
}
and code is same just object changed
*Preference myPref = new MyClass();*
*// based on events*
abc.addPreference(myPref);
or
abc.removePreference(myPref);
And i will get *out of memory error* after some time. This sound stupid but
it is true. Now *in case of MyClass if i use CheckBoxPreference* *as it is
extending Preference i am not getting error and there is no VM Heap size
grow while running the apps*. So what is wrong with *MyClass . i am not
doing any special things in that.*
--
/ Vanraj
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"android-framework" 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-framework?hl=en
-~----------~----~----~----~------~----~------~--~---