public class Cust_Details_address extends Fragment{
String operator;
EditText operator_name;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.details_customer_2, container, false);
Intent intent=getActivity().getIntent();
operator = intent.getStringExtra("operator");
operator_name = (EditText)view.findViewById(R.id.operator_id);
operator_name.setText(operator);
Toast.makeText(getActivity().getApplicationContext(),"operator"+operator,Toast.LENGTH_SHORT).show();
return view;
}
}
在Toast中显示操作员名称但EditText是空白的,请提前感谢。