Available Methods
- setText ( )
- addTextChangedListener ( )
- setHint ( )
- setSelection ( )
- setInputType ( )
- requestFocus ( )
- setError ( )
- setOnEditorActionListener ( )
- getText ( )
- setOnFocusChangeListener ( )
- getSelectionStart ( )
- setTextColor ( )
- setFocusable ( )
- setEnabled ( )
- setTextSize ( )
- setLayoutParams ( )
- setFilters ( )
- setFocusableInTouchMode ( )
- setSingleLine ( )
- getSelectionEnd ( )
- setHintTextColor ( )
- setPadding ( )
- setVisibility ( )
- setGravity ( )
- append ( )
- setBackgroundDrawable ( )
- setOnKeyListener ( )
- selectAll ( )
- setOnClickListener ( )
- setImeOptions ( )
- getInputType ( )
- setTransformationMethod ( )
- post ( )
- setOnTouchListener ( )
- startAnimation ( )
- clearFocus ( )
- length ( )
- setLines ( )
- dispatchKeyEvent ( )
- getParent ( )
- getEditableText ( )
- setBackgroundColor ( )
- setKeyListener ( )
- setTypeface ( )
- getId ( )
- setImeActionLabel ( )
- setTag ( )
- setMaxLines ( )
- setEllipsize ( )
- setClickable ( )
- setRawInputType ( )
- getTag ( )
- setSelectAllOnFocus ( )
- setId ( )
- setBackground ( )
- setLongClickable ( )
- getLayout ( )
- getHint ( )
- focusSearch ( )
- hasFocus ( )
- setHighlightColor ( )
- setAutofillHints ( )
- setCompoundDrawablesWithIntrinsicBounds ( )
- setCursorVisible ( )
- setMinWidth ( )
- requestFocusFromTouch ( )
- setBreakStrategy ( )
- setLineSpacing ( )
- postDelayed ( )
- setHorizontallyScrolling ( )
Related Classes
- java.io.File
- android.os.Bundle
- android.content.Context
- android.view.View
- android.util.Log
- android.widget.TextView
- android.content.Intent
- android.view.ViewGroup
- android.app.Activity
- android.view.LayoutInflater
- android.os.Build
- android.widget.Toast
- android.widget.ImageView
- android.graphics.Color
- android.net.Uri
- android.widget.Button
- android.text.TextUtils
- android.view.MotionEvent
- android.widget.LinearLayout
- android.support.annotation.Nullable
- android.content.SharedPreferences
- android.support.annotation.NonNull
- android.annotation.SuppressLint
- android.content.DialogInterface
- android.view.WindowManager
Java Code Examples for android.widget.EditText#setLongClickable()
The following examples show how to use
android.widget.EditText#setLongClickable() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MongolInputMethodManager.java From mongol-library with MIT License | 6 votes |
private void setAllowSystemKeyboardOnEditText(EditText editText, boolean allowSystemKeyboard) { // TODO this needs to be tested on lower versions! // https://stackoverflow.com/a/45229457 if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { // api 21+ editText.setShowSoftInputOnFocus(allowSystemKeyboard); } else { // api 11+ if (allowSystemKeyboard) { // re-enable keyboard (see https://stackoverflow.com/a/45228867) // FIXME this does not necessarily always work editText.setTextIsSelectable(false); editText.setFocusable(true); editText.setFocusableInTouchMode(true); editText.setClickable(true); editText.setLongClickable(true); editText.setMovementMethod(ArrowKeyMovementMethod.getInstance()); editText.setText(editText.getText(), TextView.BufferType.SPANNABLE); } else { // disable keyboard editText.setTextIsSelectable(true); } } }
Example 2
Source File: DialpadView.java From call_manage with MIT License | 5 votes |
/** * Whether or not the digits above the dialer can be edited. * * @param canBeEdited If true, the backspace button will be shown and the digits EditText * will be configured to allow text manipulation. */ public void setDigitsCanBeEdited(boolean canBeEdited) { View deleteButton = findViewById(R.id.button_delete); deleteButton.setVisibility(canBeEdited ? View.VISIBLE : View.GONE); View callButton = findViewById(R.id.button_call); callButton.setVisibility(canBeEdited ? View.VISIBLE : View.GONE); EditText digits = (DigitsEditText) findViewById(R.id.digits_edit_text); digits.setClickable(canBeEdited); digits.setLongClickable(canBeEdited); digits.setFocusableInTouchMode(canBeEdited); digits.setCursorVisible(canBeEdited); }