Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Creating a copy of a View?

I have 2 Activities: A,B.Layout of Activity A,has a viewgroup that user changes it's content.In Activity B,I have to show that viewgroup again,without any change,it must be a real copy of that viewgroup,so texts,colors,dimensions,order(of childs) and ... must be same.So I can not use Layout Inflater.Is it possible without creating classes of the type of childrens of that viewgroup and change properties?Because if I have more than 2 Activity with different viewgroups,it is very difficult to show viewgroups of each activity in last Activity.

Also I can not remove those viewgroups from their parents.

like image 688
Student Student Avatar asked Jan 02 '13 08:01

Student Student


People also ask

What do you mean by Google Analytics?

Google Analytics is a platform that collects data from your websites and apps to create reports that provide insights into your business.


1 Answers

If their content will be the same, there is no point in having two different activities. You can dynamically change one activity' s content and the behavior will be the same as there were two activities. If it is really necessary, then you will have to save all the needed information to reconstruct the activity again and pass it to the newly created activity. Take a look at this.

like image 172
Alpay Avatar answered Nov 08 '22 16:11

Alpay