android-edittext

Android enter key listener

天大地大妈咪最大 提交于 2020-07-05 04:19:05
问题 Can someone help me with a softkeyboard enter key listener? I need a enter key listener like a button listener that would have a few editext listeners inside like this enterkey.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if(editext1.getText().toString().equalsIgnoreCase("test1")) { button3.performClick(); } if(editext1.getText().toString().equalsIgnoreCase("test2")) { button4.performClick(); } } ); I also need something like below is this correct?

multiline edittext where parts are not editable, like fill in the blanks

左心房为你撑大大i 提交于 2020-07-02 09:52:54
问题 I need to have a view which contains textview and edittext. Example: Yay! you made it to ______ We should hang out! feel ____ to follow me. Above "_____" could be of any length and it should feel like a paragraph in the end. Rest of the text given above is not changeable. Just like fill in the blanks. 回答1: From my perspective, a fill-in-the-blank widget should do the following: Allow only certain identified portions of the text to be changed. The rest of the text is locked. Not allow cursor

multiline edittext where parts are not editable, like fill in the blanks

筅森魡賤 提交于 2020-07-02 09:46:23
问题 I need to have a view which contains textview and edittext. Example: Yay! you made it to ______ We should hang out! feel ____ to follow me. Above "_____" could be of any length and it should feel like a paragraph in the end. Rest of the text given above is not changeable. Just like fill in the blanks. 回答1: From my perspective, a fill-in-the-blank widget should do the following: Allow only certain identified portions of the text to be changed. The rest of the text is locked. Not allow cursor

Android EditText doesn't show the Keyboard

a 夏天 提交于 2020-06-27 08:22:30
问题 I have a screen with three EditText's, and one of then, the first one, in the top of the screen doesn't call the keyboard when I click on it. I'm not using an AVD, I'm using my own device, and tested in others devices and same result. I'll put the screen here and the xml codes... there is nothing diferent between the EditTexts, just position. To make an input in that EditText I need to select one of the EditText above, and then the keyboard shows up. At least it doesn't hide when I select the

In Android, Is it possible to make Text Tag separation in editext Like Stack overflow (see the image)?

旧时模样 提交于 2020-06-17 14:56:14
问题 I want to create this kind of separation between commas(,)? like StackOverflow Tags 回答1: Try this: In MainActivity.java import android.os.Bundle; import android.support.v7.app.AppCompatActivity; import android.support.v7.widget.RecyclerView; import android.support.v7.widget.SwitchCompat; import android.widget.CompoundButton; import android.widget.Toast; import java.util.ArrayList; import java.util.List; import me.originqiu.library.EditTag; public class MainActivity extends AppCompatActivity

android - Using EditText values to a textview on another activity

被刻印的时光 ゝ 提交于 2020-06-13 11:12:30
问题 What I need is quite simple. 1- User types some info on EditTexts. 2- Uses intent and bundle to take the data to another activity 3- Shows the data stored from EditTexts to TextViews. But, here's the problem. EditTexts are at MainActivity, the activity that will receive the data isn't the next one, but the last one, named finalizar_relatorio.class. And also, I'm trying to send this bundle to the next activity when I call one method because if I use startActivity() inside onCreate, it will

disable setMovementMethod(LinkMovementMethod.getInstance()) on android

两盒软妹~` 提交于 2020-06-13 07:13:15
问题 I'm using setMovementMethod(LinkMovementMethod.getInstance()) for EditText view in my android app. Links inside EditText works fine but in some situations I need programly disable this method (for reason of enable copy item in longClick menu). How to do it? I need something like "removeMovementMethod()". Can you help me? Thank you! 回答1: After setMovementMethod(null) longClick menu will disable. Therefore better use this method: setMovementMethod(ArrowKeyMovementMethod.getInstance()) 回答2:

disable setMovementMethod(LinkMovementMethod.getInstance()) on android

一曲冷凌霜 提交于 2020-06-13 07:13:10
问题 I'm using setMovementMethod(LinkMovementMethod.getInstance()) for EditText view in my android app. Links inside EditText works fine but in some situations I need programly disable this method (for reason of enable copy item in longClick menu). How to do it? I need something like "removeMovementMethod()". Can you help me? Thank you! 回答1: After setMovementMethod(null) longClick menu will disable. Therefore better use this method: setMovementMethod(ArrowKeyMovementMethod.getInstance()) 回答2:

How to set TextInputLayout's outlined box floating hint background color

≯℡__Kan透↙ 提交于 2020-05-29 09:56:26
问题 How to change the background color of the floating hint in a text input layout outline box style to transparent. I think the attached picture clearly states the issue It should be red above the stroke and white below). What I did to change the background itself was: <style name="App.TextInputLayout" parent="Widget.MaterialComponents.TextInputLayout.OutlinedBox.Dense"> <item name="boxBackgroundColor">@color/white</item> </style> Any help is greatly appreciated 回答1: If you look at the style