this is what I tried and nothing works looked everywhere but found nothing
str.setTypeface(notoKyfiBold);
str.setText("دوس هنا للكتابه");
str.setTextColor(Color.BLACK);
str.setGravity(Gravity.CENTER);
str.setFocusable(false);
str.setFocusableInTouchMode(false);
str.setCursorVisible(false);
str.setClickable(false);
str.setMaxLines(15);
str.setEnabled(false);
str.setActivated(false);
str.setSingleLine(false);
str.setMaxTextSize(50);
str.setKeyListener(null);
str.setMinTextSize(0);
str.setHintTextColor(Color.TRANSPARENT);
str.setBackground(null);
str.setBackgroundColor(Color.TRANSPARENT);
str.setSizeToFit(true);
str.setPadding(10,0,10,0);
str.endBatchEdit();
str.setDrawingCacheBackgroundColor(Color.TRANSPARENT);
str.getPaint().setStrokeWidth(4);
str.setHighlightColor(Color.TRANSPARENT);
str.getPaint().setStyle(Paint.Style.STROKE);
the line is the one directly below the text, not that bottom border:
If you want to do it programmatically, then you can use the following code.
//assume an EditText object with name myEditText
myEditText.setInputType(myEditText.getInputType() | InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD | InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS);
InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS does not seem to work as expected on all keyboards whereas InputType.TYPE_TEXT_VARIATION_VISIBLE_PASSWORD has the drawback that it also disables toggling the language in the keyboard and the swipe gesture to add the text.
Just add following attribute in your edittext block in xml file:
android:inputType="textNoSuggestions"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With