@Override public boolean dispatchTouchEvent(MotionEvent ev) { if (getCurrentFocus() != null) { InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE); imm.hideSoftInputFromWindow(getCurrentFocus().getWindowToken(), 0); } return super.dispatchTouchEvent(ev); }
public class Fragment1 extends Fragment { @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View rootView = inflater.inflate(R.layout.fragment1,null); EditText Inv = (EditText) getView().findViewById(R.id.edt1); return rootView; } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)