最后在Fragment中如果不点击按钮,从Activity传过来value值怎么为null,点击了按钮却是Activity传过来的value值
btn.setText("获取Activity静态传值");
String value = getAaa();
Log.i("tag", "Activity静态传值为:"+value); //这一步的值为null
btn.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
String value = getAaa();
Log.i("tag", "Activity静态传值为:"+getAaa()); //这一步的值为Activity传的值
}
});