You can resuse single View in multiple Activities, but I would use Application Context to create that View. You need to call this (ViewGroup(view.getParrent)).removeView(view) onPause or in onStop. Pass that view reference to helper class, and from Activity B you can resuse that View.
W dniu wtorek, 16 kwietnia 2013 07:06:31 UTC+2 użytkownik Jayu napisał: > > Hi, > > Need help in understanding the following case, > > Say I have a view '*child*' created in Application context, I add '*child*' > to a parent '*Parent A*' which is in context of Activity '*A*'. > > I switch the activity to Activity '*B*' where I would want to add '*child*' > to parent '*Parent B'* which is in context of Activity '*B*' > > Tried doing* 'Parent A'.removeview(child)* in onpause of '*A*' > > it was of no much help. > > > Question, can we reuse a single view to multiple parents without > recreating the view ? > > > Thank you, > > Regards, > Jayanand > > > > > -- -- 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 unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

