Cory, you and I have basically done the same thing. I think an upgrade to this approach is being suggested by TreKing and Kostya, which is, simply using the delegation, but ditching the base classes. That way, if we need different delegates we can pick and choose on the fly as necessary. A little more mental maintenance perhaps, but less dependencies on base implementations, and more flexibility.
On Friday, May 13, 2011 1:40:29 PM UTC-4, Cory Kaufman wrote: > > What happens when you need a MapActivity? Or ListActivity? Or >> ExpandableListActivity? Or ... ? >> > > Good point. I rewrote my base classes to delegate to a utility class. I > have each base class pass itself to the constructor of the utility class in > case it needs to reference the current activity for whatever reason. There's > still a little bit of duplication in that each base class is basically the > same (a bunch of methods that delegate to the utility class) but I don't see > any way around that and it's tolerable duplication. I just need to remember > to copy+paste the delegating methods into each base class when I add a > method to the utility class. > -- 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+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en