title: EditText copy, cut ,paste is not working on implementing it programmatically
body: <p>I am implementing EditText programmatically, code is like this</p>
  
  <pre><code>private View createTextField(String schemaName, LinearLayout.LayoutParams params2, String fieldMaxLength) {
      final EditText editText = new EditText(mContext);
      //editText.setHint(field.getDisplayName());
      // set the layoutParams on the button
      editText.setLayoutParams(params2);
      editText.setTextSize(TypedValue.COMPLEX_UNIT_SP, editTextSize);
      editText.setTypeface(Typeface.create("sans-serif-bold", Typeface.NORMAL));
      editText.setTextColor(getResources().getColor(R.color.edit_text_color));
      if (schemaName.equals("Notes")) {
          editText.setMaxLines(10);
          editText.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_CAP_SENTENCES | InputType.TYPE_TEXT_FLAG_MULTI_LINE);
      } else {
          editText.setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_FLAG_CAP_SENTENCES);
      }
      if (fieldMaxLength != null) {
          try {
              int maxLength = Integer.parseInt(fieldMaxLength);
              editText.setFilters(new InputFilter[]{new InputFilter.LengthFilter(maxLength)});
          } catch (NumberFormatException nfe) {
  
          }
      }
      return editText;
  }
  </code></pre>
  
  <p>On long press I am getting the options for copy ,cut and paste but none of them is working.</p>
  
  <p>[<img src="https://i.stack.imgur.com/cmukI.png" alt="enter image description here"></p>
  
  <p>Please help me ,where i am doing wrong ?</p>