Im trying to make it so when the user clicks away from the keyboard (any where on the page) it closes down (to be able to view page without it there as I have a key edit texts on the page they may want to fill out before..) ive tried lots of solutions and many answers on stack overflow but non seem to be working for me ...
public class OneFragment extends Fragment implements BlockingStep {
public interface PassingData { //create interface to pass data
void passData (String data);
}
String stepOne;
EditText _fromET;
EditText _toET;
EditText _refET;
EditText _numET;
private PassingData PD_listener; // declare member variable of interface
@Override
public void onAttach(Context context) {
super.onAttach(context);
PD_listener = (PassingData) context; //initialize interface using onAttach method
}
@Override
public void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
View view = inflater.inflate(R.layout.fragmentone, container, false);
_fromET = (EditText) view.findViewById(R.id.FROM);
_toET = (EditText) view.findViewById(R.id.TO);
_refET = (EditText) view.findViewById(R.id.REF_NUM);
_numET = (EditText) view.findViewById(R.id.CONTACTNUM);
return view;
}
I tried using inputmethodmanager and also a focusListener but both failed...
Any help would be great, thank you! Abbie