I am currently attempting to clear the sensor values in a fragment, that are constantly being updated, however the clear button that I have set does nothing, even when I have paused the sensors. Have I correctly setup the onViewCreated?
I have also attempted to setup the textviews in onCreateView to no success. I get no errors whatsoever when I press the clear button, the values just don't clear.
Any pointers would be greatly appreciated!
public void onViewCreated(View view, Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
mPitchView = (TextView)view.findViewById(R.id.textView4);
mRollView = (TextView)view.findViewById(R.id.textView5);
mAzimuthView = (TextView)view.findViewById(R.id.textView6);
mRadioGroup = (RadioGroup) view.findViewById(R.id.radioGroup);
mRadioGroup.setOnCheckedChangeListener(this);
view.findViewById(R.id.button_clear).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
onClear();
}
});
}
public void onClear(){
mPitchView.setText("");
mRollView.setText("");
mAzimuthView.setText("");
}
Also I have two other buttons start and stop which work perfectly fine. I think the issue is the textview not updating.