Need help with below case -
Screen has edit text when we enter text display popup dialog and display search result for entered text in background edit text.
Pop-up dialog has title text view and List view which displays search result.
When I enter first letter in edit text, pop-up dialog gets displayed but then background screen which has edit text
becomes non interactive and I am not able to enter any text further in edit text.
Does anyone has solution for this issue? Or do I need to use different approach please suggest.
It is the intended behaviour of a dialog, to block everything in the background, while it is shown (modal dialog), so you probably need to find a different way to achieve what you want.
Have a look at the AutoCompleteTextView, this might be what you want.
https://developer.android.com/reference/android/widget/AutoCompleteTextView
Related
Problem: In soft keyboard settings, there is a toolbar option, if we turn it on, it will give you some suggestions, for example, if a copied something, it will start appearing on the top of keyboard(marked red in the screen shot), if the user clicks that suggestion, it will be pasted on the edit text which have the focus.
Things i have tried.
override autofill method (not working, not called).
added text watcher, beforeTextChanged is called and the editable text is empty.
added the OnKeyListener (not working, not called).
added the onTextContextMenuItem (not working, not called).
Read bunch of questions on Stackoverflow but no question/answer is helping.
here is the screen shot:
PS: I am not sure how can i capture this click, and intercept the text, problem is that I am using the custom view for OTP, and when user click that suggestion, only first box is filled with the first character because we have max length equals to 1. I want to capture that text and fill it in my view accordingly. Any help is appreciated.
I have checked the following documents
https://developer.android.com/guide/topics/text/autofill
https://developer.android.com/guide/topics/text/copy-paste
I have a situation where the search box can be anywhere on the screen, once the user select the search box, i want show the Search Suggestion fragment on full screen, i populate the suggestion list as the user types in, on done i want to close the fragment and populate the selected text on the search box, similar to google PlaceAutocompleteFragment. what are the building blocks i need? thank you in advance, this is my first question sorry if there are any formatting issue in my question
Was able to do it by designing transparent screen with EditText on screen. and start activity for results on Parent activity EditText onfocus
What im wondering is, should i hide "continue" button while EditText is empty? Is there a principle not recommending that? Alternative solution is popping up error dialog warning user to enter text. Thanks.
It would be better to use Text Validator, so that user will click continue, then popup will appear near the text and show what is going wrong with certain field.
It may be similar to something like this:
EditTextValidator
I want to show floating edit texts and buttons on screen in android e.g. look below the image, there are 3 edit texts and 2 buttons which are floating on current screen. I searched a lot on net but got nothing. So please anyone suggest how to do this, even some links will be useful.
Its Ok, if the widgets are not transparent, but it should give feel that they are floating on my current screen.
Pop up or custom Alert dialog may solve your problem.
But simple solution is take another layout in xml of the activity. In that layout add those edittexts and buttons. Set its visibility to false. And when you want to show then, make layout's visibility to true.
I’ve created a search activity in my app, in the standard Android way, without custom suggestions. When a user starts typing text or presses the search button, they get a search dialog with search box, something like figure 1 from here:
http://developer.android.com/guide/topics/search/search-dialog.html
You’ll notice in the background is the previous activity, the words “abide”, etc.
My problem is that the previous activity is shown clear as day behind the search dialog, and its confusing for users, because users think all that is still active, and they try to press on it, but it just cancels the search dialog. And it distracts the user from the search task (are those search results, they may wonder?).
Question: how to blur (make out of focus) or darken the previous activity?
I actually see this in some app’s search screens.
I found a simple way to blur the background of the search dialog:
Basically it's just adding a (half) transparent view over the ListView (or what is under the dialog) and hide it by default. If the search dialog appears (calling onSearchRequested()) it is set to visible, if it disappears it's set back to gone (invisible).
Check out the details at my blog: http://mavistechchannel.wordpress.com/2011/08/13/blur-background-android-search-dialog/
Assuming you got dialog from a Dialog.Builder, use the following:
dialog.getWindow().addFlags(WindowManager.LayoutParams.FLAG_BLUR_BEHIND);