Hi; i was thinking to build a somewhat polymorphic ViewSwitcher. It will not be limited to a single type of (or a limited set of predefined) views, but i don't want to create a new view for every child that will be shown and i also do not want to add all of these and keep them (As in a ViewAnimator, There might be hundreds! ). I want it to work just like an adapterView, if there is a view that can be reused (recylced) amongst its children of that class; it will just bind it to new data and create a new one only if there isn't.
By such an approach, let's say you have 10 textViews, 25 Imageviews, 30 customSomewhat views to show; this switcher needs only 6 views as its children (2 of each type) and these will be recycled constantly. Anyway my question is; I will have to get runtime classes of views and use reflection is this an overkill? Or Is there any special consideration about reflection that i should know since the VM (dalvik) is different? Would I be better off just creating a new view everytime? --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] Announcing the new M5 SDK! http://android-developers.blogspot.com/2008/02/android-sdk-m5-rc14-now-available.html For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -~----------~----~----~----~------~----~------~--~---