我需要将一个变量从(周围)非活动类传递给一个 nameget(android activity)class 。在文本视图中显示传递的变量值。请告诉我这个例子需要做什么。如何将其传递给android活动
public class around(non-activity class)
{
String name = "arjun";
//how to pass this name value to an below activity
nameget nam = new nameget();
String new = nam.get(name);
}
public class nameget extends Activity(android activity class)
{
public String get(String name)
{
String got = name;
TextView t1 = (TextView)findViewById(R.id.textView1);
t1.setText(name);
}
}