I would like to create a TextView multiple times in different activities programmaticly. Instead of setting the attributes each time, I was thinking I may be able to save the attributes in an xml file and just use it each time I add a TextView to an activity. From what I read I think using the following code would work.
XmlPullParser parser = resources.getXml();
AttributeSet attributes = Xml.asAttributeSet(parser);
TextView textView = new TextView(this, attributes);
My qustion is this a valid way to do it? and my second question is where and how should the xml attributes be saved? in Layout folder or values?? does it make a difference?
Thank you