Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: Difference between positive, negative, and neutral button

Is there a functional difference between positive, negative, and neutral buttons, particularly in the context of AlertDialogs?

like image 467
bibismcbryde Avatar asked Jul 09 '12 19:07

bibismcbryde


People also ask

What is a positive button?

That is, you cannot have more than one "positive" button. This limits the number of possible buttons to three: positive, neutral, and negative. These names are technically irrelevant to the actual functionality of your buttons, but should help you keep track of which one does what.

What is use of neutral button in dialog box?

In the above code, when user click on button it will show dialog with yes,neutral and no button. When user click yes button it will show yes message, no button shows no message and neutral button for neutral message. In the above result, it shown initial screen.

How many buttons can an alert dialog display?

AlertDialog. A dialog that can show a title, up to three buttons, a list of selectable items, or a custom layout.

Which dialog button need to create for the option when the user may not want to proceed with the action but doesn't necessarily want to cancel?

Alert Dialog allows maximum three action buttons in a dialog.


1 Answers

Just the position they take within the dialog...

  • On devices prior to Honeycomb, the button order (left to right) was POSITIVE - NEUTRAL - NEGATIVE.
  • On newer devices using the Holo theme, the button order (left to right) is now NEGATIVE - NEUTRAL - POSITIVE.
like image 50
devunwired Avatar answered Oct 27 '22 12:10

devunwired