I need to store the user input in an EditText after the user write something and clicks the blue keyboard button (on the bottom right of the keyboard). Instead of the classic check icon I would prefer an arrow icon like the one in the snapchat app in the text field for "normal" messages. Anyone knows how to do that? I guess it depends on the value of the android:inputType attribute in the xml file, but I can't find any values that make the keyboard have that arrow icon.
Related
I want to move an edit text on top of the keyboard when the keyboard opens. And when the keyboard closes I want to move the view back to its original position. Something like this video.
Here in the video when you tap on the edit text field the keyboard opens and the view translates on top of the keyboard, now when the keyboard closes the edit text comes back to the original position. Also, notice how any view on the background is not moving its place only edit text is moving.
I have done this partially by android:windowSoftInputMode in the activity. but doing so will move the entire activity not that only particular edit text.
So can anyone please guide me with this?
In your Manifest file inside the selected activist tag add
android:windowSoftInputMode="adjustResize"
and in your EditText add
android:layout_alignParentBottom="true"
Hope this might help
I'm trying to create some drawing functionality, effectively very similar to MSPaint. I want to make a TextBox tool, such that I can draw a textbox on my canvas and have a user type in it like a real textbox. Once the user clicks off of the textbox or presses escape, then I would "stroke" the text to the GraphicsContext.
I'm not sure how to do this. My current attempt has me using StackPane to stack two canvases on top of each other. I let the user "draw" a textbox with the mouse, and then I create a textbox programmatically which I am trying to pass the keyevents into. Then when the user clicks off, I write textbox.getText() to the GraphicsContext. This has not been very successful. Specifically, I'm not sure how to handle special keys like BACKSPACE and DELETE and letting the user click to place the cursor.
I'm looking for advice on a better approach.
Already tried setting android:windowSoftInputMode="adjustPan" in the manifest file,
When I tap the bottom (4th one from top) EditText, the soft keyboard partially hides it:
This however does not happen in the Android emulator - the screen pans and I get the focus on the EditText (keyboard still covers a small part of the EditText but it's acceptable I think):
Put your EditText inside the ScrollView and then give property adjustResize, instead of adjustPan, it will automatically adjust your screen and its components.
I have a RelativeLayout with an EditText and a Button in it.
When the keyboard opens, the layout is pushed up to show the EditText above the keyboard, but it's not enough to bring up the Button to prevent it from hiding under the keyboard.
Is it possible to move the layout up more, or somehow prevent it from being under the keyboard?
Thanks
A similar question has been answered here: Android soft keyboard covers edittext field
Ideally you will be able to use windowSoftInputMode to control how your Activity is moved around when the soft keyboard is displayed.
I use EditText as a TextView because I need to highlight some certain part of text and EditText is doing it great. Now, if I want to share this highlighted quote with ActionBarSherlock's ShareActionProvider it goes well - I can pick this text from EditText.
But if a user longpress the text - he can highlight it any way he want. But the only option is to do something with that - for example, copy this selection and selection disappears after that. What I want is to freely highlight the text and then share highlighted text which should be keeped highlighted.
When you longpress the EditText you can select text, but any action like "copy" takes off selection and text is not highlighted