Which method i must override, that the xml layout use to read the resources linked with, sample:
if i had TextView within my layout:
<TextView android:layout_width="wrap_content"
android:layout_height="wrap_content" android:id="@+id/textview1"
android:text="@String/text_test1"
</TextView>
and in my Activity in onCreate, we always use setContentView:
setContentView(R.layout.sample);
—
my question is : when we use xml file as layout in activities, how the layout reads the resources like android:text="@String/text_test1, so i can for example override it, so when the layout request any String i can bind another text to it ?
—
Note : am not looking for regular way, by finding the view in the XML, and then change it properties.
am looking for abstract way to change every String requested in the resources by xml layout.
To change the text you need to simply use this in your activity.
To override the entire TextView you need to create a custom textview class that extends TextView and perform your stuff there.