Here you have stringName
as a text in your textView1
.
You can fetch String value
programatically from resourses by stringName
.
Step1
: first fetch this both values, and store it in a variable;
String mTvTextStrName = textView1.getText().toString().trim();
String strValue = getStringResourceByName(mTvTextStrName);
use this method to fetch String value.
private String getStringResourceByName(String aString) {
String packageName = getPackageName();
int resId = getResources().getIdentifier(aString, "string", packageName);
return getString(resId);
}
You can also check this values via Log.e
.
Step2
: Now set your strValue
in your textView2
.
// Do your code.. Show Apple
textView2.setText(strValue);