Official Murl Engine Forum

Full Version: ISystemDialog button order messed up?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
According to the documentation, the button order in an ISystemDialog is right to left and bottom up. However, the dialog created below shows the cancel button on the left and the ok button on the right:

ISystemDialog systemDialog = deviceHandler->CreateSystemDialog("Hello World", "This is a message.", "Cancel", "Ok");


(Tested on Android)
You are right, the button order on Android is reversed. Will be fixed in next release.
We recently found out that in some devices the buttons are not reversed. It probably depends on the API level or on the manufacturer.
(26 Jul 2013, 15:15)Stefan Wrote: [ -> ]We recently found out that in some devices the buttons are not reversed. It probably depends on the API level or on the manufacturer.

On all our test devices the button order is reversed. Could you please give some more details about the device and the API level where the button order is not reversed. Thanks!
The device is a HTC One with Android 4.1.2 (16) and HTC Sense 5.0.
Android has changed the button order on the AlertDialog with API level 11.
On devices prior to HONEYCOMB, the button order (left to right) was POSITIVE - NEUTRAL - NEGATIVE.
On devices using HONEYCOMB or later, the button order (left to right) is now NEGATIVE - NEUTRAL - POSITIVE.

We will reverse the button order of the ISystemDialog on Android in our next release to guarantee that on dialoges with more than 1 button the negative button is always button 0 across all platforms.

The documentation will be revised: The button order is platform dependet but it is ensured that the negative button is always button 0 on dialoges with more than 1 button.

Therefore on Android
- if the Android OS Version is prior to HONEYCOMB or
- if the TargetSdkVersion of the App is prior to HONEYCOMB
the order in the dialog will be (left to right)
POSITIVE - NEUTRAL - NEGATIVE resp. Button 2 - Button 1 - Button 0.

Otherwise on Android the order will be (left to right)
NEGATIVE - NEUTRAL - POSITIVE. resp. Button 0 - Button 1 - Button 2.