Saturday, 14 September 2013

How to set Text from another layout without using Shared Preferences or putExtra

How to set Text from another layout without using Shared Preferences or
putExtra

I have two textViews in different activity A and B that need to have the
same Value. I can not use putExtra because I am not going from Activity A
to B. I do not want to use Shared Preferences. I do not want to put then
query from a sqlite. Is there a way for me to call for the Text in
Activity A when I am on Activity B ?
I am able to get the Layout value of Activity A from Activity B but not
the text Value in a textView of Activity A
In Activity B
Name1.setText(R.layout.menuview);
That will give me the name value of the xml file. I want the value of a
this textView inside the xml file.
In Activity A
m1a = (TextView) findViewById(R.id.m1a);

No comments:

Post a Comment