I was wondering is there any way I can display a help button while the dialog is still up. I want the user to be able to press that button even if he doesn't answer the dialog
Related
So i have one simple dialog thats starts when activity is created, but when i click besides the dialog it is closed and activity is shown. I would like to disable the activity until the user click the button on dialog box. Can you give me some ideas?
Thanks in advance
Please set this-
dialog.setCancelable(false);
I know this should not be a big challenge but it really drives me insane.
I am developing a simple soft keyboard input method and basically I have added a button to my softkeyboard, by pressing which, a dialog should pop up to prompt user to do some choices.
By far everything is ok about creating and opening the dialog. Since normally a dialog is created and displayed from outside an activity, so a flick solution could be to create a transparent activity which embedded the dialog in it. By doing so, I could easily start a dialog when user click the button on my softkeyboard.
But one tricky problem is: every time user click the button and the dialog (actually a dialog in a transparent activity) displays, it will always make my softkeyboard hide. I just need to start the dialog without any changes to the status of my softkeyboard -- I want my softkeyboard keeps showing when the dialog starts.
Here is a snapshot of Google Keyboard, it has the similar button which display a dialog and the dialog did not hide the keyboard, this is exactly what I want. So please anyone suggest me how to achieve this. Thanks so much.
THey aren't launching an Activity. They're launching a dialog. Which is tricky from an input method because its a service (you have to specify the dialog's window token to make it show) but doable.
Is it possible to capture an event BEFORE a ShareActionProvider icon is clicked? For example, once a share icon is clicked, I want to display a dialog box asking the user "Do you really want to share?" and then have the opportunity to cancel the share action. I have tried to put the dialog box into onShareTargetSelectedListener, but it won't work. Thanks for any hints.
I'm new at android development so be patient with me.
I have an app which shows a pop up window containing a 'next' button. when it is clicked, previous one closes and new one opens with different information.
the problem is when this button is clicked in very high rate, some times previous dialog window stays and the new window appears at the same time. this does not happen every time. Dialog is used to create the popup window. dialog.dismiss() is used every time the next button is clicked. I'm trying to fix this in case if some user try to do the same thing.
in the button action
dialog.dismiss();
nextaction();
the nextaction() contains the initilization and the image and textloading to the popup window
some thing like
dialog = new Dialog(ctx);
dialog.requestWindowFeature(Window.FEATURE_NO_TITLE);
dialog.setContentView(R.layout.popupview);
(dialog is global variable)
So can any one be kind enough to give some suggestions. thanks in advance
I want to keep AlertDialog focused until a user presses any of the buttons on it. In other words, even if a user presses any other area (like it's parent area) or presses back button, dialog must still remain focused. Please let me know which Android 4.0 API method to use.
Thanks much in advance.
use setCancelable(false); It will stop removing your AlertDialog from your screen.