Is it possible to set the view of a view by taking data from a already created layout?
For example:
I have the layout file test_layout.XML
<TextView
android:id="@+id/TextView1"
android:text="TextView1"
android:background="@color/wisteria"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
I now want to create a new view that is being created out of this TextView. If creating a new view out of a Drawable I would simply do:
imageView.setImageResource(R.drawable.shape1);
How do I create a new view, by including all the attributes in the TextView1? I simply want to create a new view out of a existing TextView. The TextView above acts as a "template". Should I do it by setViewById?
I hope I made myself clear, a little hard to describe.