Problem Description
Alert dialog buttons getting clipped on specific devices (Samsung Galaxy SII and LG Optimus V)
Expected Results
Being able to see the custom alert dialog just fine.
Actual Results
Clipped alert Dialog.
Repo Steps
1. Create new Mobile Project
2. Add this code to the app.js
var w = Ti.UI.createWindow({
backgroundColor: '#ffffff'
});
var button = Ti.UI.createButton({
width: 200,
height: 40,
top: 10,
title: "Open alert dialog"
});
var button2 = Ti.UI.createButton({
width: 200,
height: 40,
top: 60,
title: "Open option dialog"
});
button.addEventListener('click', function(e) {
var alert = Titanium.UI.createAlertDialog({
cancel : 2,
buttonNames : ['Take Photo', 'Choose Existing Photo', 'Cancel'],
height: Ti.Platform.displayCaps.platformHeight-280
});
alert.show();
});
alert(Titanium.Platform.displayCaps.platformHeight);
button2.addEventListener('click', function(e) {
var dialog = Titanium.UI.createOptionDialog({
options:['Take Photo', 'Choose Existing Photo', 'Cancel'],
cancel:2
});
dialog.show();
});
w.add(button);
w.add(button2);
w.open();
3. Run this code in the Samsung Galaxy S3.
Extra info
Here is the pastie link of the code sample
http://pastie.org/private/x4rw8an7jv4uefgvfzq26g
This is a native Android bug. This issue also happens in native Android apps. Mark the ticket as won't fix. If we set "title: 'Some Title'" when creating the alert dialog, the buttons won't get clipped.
Closing this ticket as it is not our bug.