Questions tagged [dismiss]
For questions related to calling the "dismiss" method in a button click listener.
dismiss
640
questions
499
votes
34
answers
368k
views
How can I dismiss the on screen keyboard?
I am collecting user input with a TextFormField and when the user presses a FloatingActionButton indicating they are done, I want to dismiss the on screen keyboard.
How do I make the keyboard go away ...
255
votes
17
answers
135k
views
Receive result from DialogFragment
I am using DialogFragments for a number of things: choosing item from list, entering text.
What is the best way to return a value (i.e. a string or an item from a list) back to the calling activity/...
85
votes
9
answers
56k
views
How to dismiss a DialogFragment when pressing outside the dialog?
I am using a DialogFragment, and while I have successfully set an image to close (i.e. dismiss) the dialog when pressed, I am having a hard time finding the way to dismiss the dialog when the user ...
79
votes
11
answers
107k
views
single function to dismiss all open view controllers
I have an app which is a single view application. I have a navigation controller linked up to all child controllers from the root view controller.
In each child controller, I have a logout button. I'...
78
votes
4
answers
34k
views
Prevent user from dismissing notification
Some apps have notifications which can´t be dismissed by swiping them away.
How can I manage such behaviour?
52
votes
8
answers
125k
views
How to dismiss AlertDialog in android
I created AlertDialog that contains 4 buttons
OptionDialog = new AlertDialog.Builder(this);
OptionDialog.setTitle("Options");
LayoutInflater li = (LayoutInflater) this....
51
votes
10
answers
47k
views
Dismiss more than one view controller simultaneously
I'm making a game using SpriteKit.
I have 3 viewControllers: selecting level vc, game vc, and win vc.
After the game is over, I want to show the win vc, then if I press OK button on the win vc, I want ...
47
votes
22
answers
51k
views
iPhone - dismiss multiple ViewControllers
I have a long View Controllers hierarchy;
in the first View Controller I use this code:
SecondViewController *svc = [[SecondViewController alloc] initWithNibName:@"SecondViewController" bundle:nil]...
46
votes
2
answers
6k
views
sendUserActionEvent() returned
I got the following error when a popup dismisses using android studio. The code works OK, but the following error appears on logcat:
E/ViewRootImpl: sendUserActionEvent() returned.
java code:
...
41
votes
9
answers
90k
views
How to dismiss AlertDialog.Builder?
In the following code below, how do I dismiss the alert box? I don't want to cause a memory leak. I tried the .dismiss() on alertDialog, but that didn't work...
Thanks
// User pressed the stop button
...
34
votes
4
answers
28k
views
How to know if a dialog is dismissed in Android?
If the dialog is dismissed,I want to do something for my background.So I want to know if the dialog is dismissed
27
votes
7
answers
12k
views
Dismissing multiple modal view controllers at once?
So have a stack with three view controllers where A is root, B is first modal view controller and C is third modal vc. I would like to go from C to A at once. I have tried this solution to dismiss.It ...
22
votes
4
answers
20k
views
iOS dismiss UIAlertView beforing showing another
I have a Utils class which shows UIAlertView when certain notifications are triggered. Is there a way to dismiss any open UIAlertViews before showing a new one?
Currenty I am doing this when the app ...
19
votes
8
answers
11k
views
How to disable snackbar's swipe-to-dismiss behavior
Is there a way to prevent the user from dismissing a snackbar by swiping on it?
I have an app that shows a snack bar during network login, I want to avoid it to be dismissed.
According to Nikola ...
17
votes
3
answers
35k
views
How to dismiss a modal VC with fade out animation?
I am using the following code in my presenting VC to fade in the child modal VC, and this works fine:
self.infoViewController.view.alpha = 0.0;
[self.navigationController presentModalViewController:...
17
votes
5
answers
26k
views
dismiss current view controller AFTER presenting new view controller - swift
I'm trying to dismiss a VC and present a new VC. but I don't want old VC to exist anymore. I use the code below to dismiss current VC and present new one. but this way, there's a time interval between ...
16
votes
4
answers
34k
views
React-native dismiss Keyboard when focus out / clicked somewhere else, outside textfield
I'm new to react-native. I have a textfield(Input). I want to the Keyboard to be dismissed when user clicks somewhere else except input field.
I tried several solutions suggested here like ...
16
votes
2
answers
16k
views
Alert dismissing using Twitter Bootstrap is not working?
I'm using Google Chrome.
Using Twitter Bootstrap, I want to add a simple alert, unfortunately the alert is not dismissing when the x is pressed!
Here's my code based on alert documentation:
<!...
16
votes
4
answers
5k
views
Dismiss ViewController after transition to release memory
I want to free up memory my ViewController used after dismissing it. I use the following code to present the new ViewController and dismiss the old one:
let sB: UIStoryboard = UIStoryboard(name: "...
16
votes
3
answers
9k
views
Why is onResume method of a Fragment never fired after dismissing a DialogFragment which was launched from the Fragment?
I am going to explain my problem as short as possible.
I have a Fragment called FragmentA which displays a DialogFragment after clicking on a specific button.
public class FragmentA extends Fragment ...
15
votes
2
answers
17k
views
Dismiss pushed view controller
So I have a view controller which I display as follows:
func showProfileForTrainer(trainer: Trainers) {
let viewPTProfileVC = ViewPTProfileVC()
viewPTProfileVC.trainer = trainer
self....
15
votes
3
answers
16k
views
SwiftUI - How to close the sheet view, while dismissing that view
I want to achieve the function. Like, "Look up" view that is from Apple.
My aim is when the sheet view push another view by navigation, the user can tap the navigation item button to close the sheet ...
13
votes
8
answers
24k
views
How to disable keyboard appearing when hitting on a text field , iOS?
I have a text field , and i need when the user presses it to show a custom picker.
The picker is shown fine , but the problem is that the keyboard appears on the bottom and i dont want that.
This is ...
13
votes
4
answers
11k
views
Is there a way to dismiss an no button UIalertView after some time?
UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"tittle"
message:@""
delegate:self
cancelButtonTitle:@""
otherButtonTitles:nil];...
12
votes
3
answers
3k
views
FloatingActionButton does not come down when dismissing Snackbar
I am trying to use a Snackbar. I have a FloatingActionButton wrapped in a CoordinatorLayout. When the Snackbar shows, the button is correctly moved up. When it dismisses automatically, the button ...
12
votes
1
answer
3k
views
UIAlertView warning when dismissing
I'm creating an alert in the following manner:
let alert = UIAlertView(title: "Network Unavailable",
message: "Oh noes!",
delegate: nil,
...
11
votes
7
answers
36k
views
Dismissing iPad UIPopoverController when BarButtonItem is pushed while it's open
Using a split view on the iPad, I have the following code:
- (void) splitViewController:(UISplitViewController *)svc willHideViewController:(UIViewController *)aViewController withBarButtonItem:(...
11
votes
2
answers
3k
views
Advanced RecyclerView library - code examples
https://github.com/h6ah4i/android-advancedrecyclerview
This seems to be a great library in terms of what functionality it offers. However, it lacks good documentation. It has a "tutorial" on ...
10
votes
3
answers
3k
views
How to keep the snackbar open after action is called
I use a snackbar to notify the users of my app that they aren't connected to the internet.
I added a "retry" action to the snackbar which re-checks the connection.
I want the snackbar to stay ...
9
votes
4
answers
58k
views
Dismiss AlertDialog.Builder from OnClick
I'm trying to make it so that a dialog pops up for users which has two buttons in the body and a cancel button at the bottom. When a user clicks one of the two buttons the dialog will disappear, and ...
9
votes
3
answers
8k
views
is there a way NOT to have the popover dismissed when pressing outside it?
I know the SDK documentation says
Taps outside of the popover’s contents automatically dismiss the popover.
But I'm sure the smart people here found a way :)
maybe I should overwrite the popover ...
9
votes
3
answers
9k
views
Android IllegalArgumentException for dismissDialog
I have used following code for download some files from our internet.
public class SplashDownload extends Activity {
public static final int PROGRESS_DIALOG = 0;
private ProgressDialog ...
9
votes
7
answers
6k
views
Correct way of showing consecutive modalViews
I have two views that need to be shown modally, one after the other. This doesn't work if we dismiss and show consecutively, like this:
[rootController dismissModalViewControllerAnimated: YES];
[...
9
votes
3
answers
9k
views
Override Dialog dismiss() with new AlphaAnimation
So right now by default the Dialog is doing this zoomin fade out effect when it gets dismissed with dialog.dismiss();
how can i override it to be my own Animation?
AlphaAnimation fadeOut = new ...
9
votes
1
answer
5k
views
how to detect if actionmode already present
I have several widgets in a view, each needing its own ActionMode. I see that the ActionMode does not dismiss automatically when the user taps outside the action bar. Thus, it is easily possible for ...
9
votes
2
answers
14k
views
dismissModalViewControllerAnimated: (and dismissViewControllerAnimated) crashing in iOS 5
I can't find any logical explanation, but the fact remains that, in iOS 5 (xCode 4.2), if I presentModalView:* animated:YES, I can call dismissModalViewAnimated:* fine, but if I call presentModalView:*...
9
votes
2
answers
5k
views
React Native Why does my keyboard dismiss instantly every time I tap on the textInput?
My keyboard always dismisses instantly when I tap on the textInput. This only happens on Android.
It's strange that I've tried removing all irrelevant codes to textInput only, but the problem still ...
8
votes
6
answers
9k
views
How to dismiss a Dialog in Android by clicking it inside?
I have seen several posts on how to dismiss a dialog by clicking on the outside. But is there a way to get the same functionality by clicking the inside the dialog window?
Are there any listeners for ...
8
votes
2
answers
2k
views
How to restrict AutoCompleteTextView dropdown dismiss?
I am working on a AutoCompleteTextView . I get some results when the users type in the AutoCompleteTextView and these are mandatory to select.
But the problem is the drop down automatically dismisses ...
7
votes
6
answers
21k
views
How do i make my progress dialog dismiss after webview is loaded?
What do I need to my code to make the dialog dismiss() after the webview is loaded?
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
...
7
votes
3
answers
7k
views
Android swipe layout to dismiss
I'm trying to make a swipeable layout so you can swipe it to dismiss like in Google now.
I managed to getting it worked on a view such as button using this codes:
SwipeDismissTouchListener:
public ...
7
votes
4
answers
5k
views
java.lang.IllegalArgumentException - dialog.dismiss
I am getting this error in my published application, only clients receive this error. I already tried several times to replicate the same mistake however unsuccessfully.
I also already tried to use ...
7
votes
2
answers
4k
views
How to dismiss a presenting view to the root view of tab view in SwiftUI?
I'm using TabView on my home page. Let's just say I have 4 tabs.
On second tab, i can go to another view using NavigationLink and I go to another 2 views using NavigationLink. Then on the latest view, ...
7
votes
6
answers
8k
views
ResignFirstResponder doesn't dismiss the keyboard (iPhone)
I've searched through this site that I couldn't find a solution to the problem I'm facing now. Hope someone can help.
I've created a UIAlertView to prompt user to enter their name in an iPhone app.
...
7
votes
2
answers
6k
views
How to Dismiss a UIPIckerView once the user has selected their choice
I have my UIPickerView hooked into a UITextField's inputView. I have it popping up. I know when the user selects a row. I know the value for the row. All that is great.
My question deals with ...
7
votes
2
answers
2k
views
UIAlertView disappears when app goes to background and come back to foreground
I am developing an iPhone application (iPhone with multi tasking support) in which I am displaying UIAlertView on error. When UIAlertView is about to get display my app is sent to background. Now, if ...
7
votes
1
answer
1k
views
How to prevent back button from dismissing the keyboard in flutter?
I want to set the keyboard to be always opened in the chat page and should not be dismissable by the back button.
The WillPopScope() widget is only preventing the back button from navigating back to ...
6
votes
3
answers
11k
views
IOS: dismiss two viewController
I have three viewController
First, Second and Third
from Second to open Third I use
Third *third = [[Third alloc]initWithNibName:@"Third" bundle:nil];
[self presentModalViewController:third ...
6
votes
1
answer
3k
views
Android Keyboard Dismissal
I have several EditText objects in an app I'm working on, and need to learn how to dismiss the keyboard when the user is done entering text, so that buttons being blocked by the keyboard on the screen ...
6
votes
3
answers
13k
views
How to dismiss Snackbar when user does any action?
I can show snackbar like this.
Snackbar snackbar = Snackbar.make(this.findViewById(android.R.id.content), "snackbar", Snackbar.LENGTH_INDEFINITE)
.setAction("action", new View.OnClickListener(...