Well, create a custom view (or ViewGroup) subclass then.
19.07.2011 13:38, Tapomay Dey пишет:
I don't want to use ViewStub directly. Instead I want to create a
custom element (like a library) and add additional custom attributes
and behaviour to it.
But I think I get it now. The doc says that there's no use keeping a
reference to a ViewStub as it's removed from the layout hierarchy
after being inflated.
BTW the customizations would have included:
Adding a private BaseAdapter that encapsulates a list of a custom
class/interface FilterItem.
While initializing the stub we should pass a list of FilterItem as
data.
Then we should set a Filterable(interface) as FilterItem click
handler. This interface is invoked when an item from the layout that
replaced the stub is clicked upon. The idea is that such a click would
perform some filtering and thus modify the contents of another
AdapterView.
This approach lets us use this stub as a widget/common xml element for
many different kinds of layouts(UI) that would act as different kinds
of filters for my filterable data.
Please let me know your thoughts on this.
Thanks and Regards,
Tapomay.
On Jul 15, 12:32 pm, Kostya Vasilyev<[email protected]> wrote:
You don't need to subclass ViewStub to use it.
http://developer.android.com/resources/articles/layout-tricks-stubs.html
-- Kostya
15.07.2011 10:02, Tapomay Dey пишет:
O god, ViewStub is declared final.
Why???????????????????
I can't extend it.
How do I reuse it?
--
Kostya Vasilyev
--
Kostya Vasilyev
--
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