Cannot Resolve Symbol "settext" Sherlockactionbar Fragment
I have a child fragment in my application that im trying to test functionality in. The idea is that the textview will update to mimic whatever is entered into the edittext. However
Solution 1:
Put the code INSIDE a method, like this:
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
View rootView = inflater.inflate(R.layout.fragment_weight, container, false);
EditText weight = (EditText) getActivity().findViewById(R.id.weightInput);
TextView label = (TextView) getActivity().findViewById(R.id.weightResult);
String result = weight.getText().toString();
label.setText(result);
return rootView;
}
Post a Comment for "Cannot Resolve Symbol "settext" Sherlockactionbar Fragment"