我是Android编程的新手,我试图创建一个非常简单的功能。我想显示我在活动一中输入的文本(通知消息)以在活动二中编码 活动一:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_two);
TextView tv1 = (TextView) findViewById(R.id.marqueeTextView2);
TextView tv2 = (TextView) findViewById(R.id.marqueeTextView);
/// I want to display in tv1 and tv2
tv1.setText("(notification message )");
tv2.setText("(notification message)");
tv1.setSelected(true);
tv2.setSelected(true);
}
我想在活动二中显示它:
describe formatted hfe_reference.dim_number;