Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-10303] Android: Alert dialog buttons getting clipped

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionNot Our Bug
Resolution Date2012-08-09T17:23:49.000+0000
Affected Version/sRelease 2.1.0, Release 2.1.1
Fix Version/sn/a
ComponentsAndroid
Labelsapi
ReporterNikhil Sharma
AssigneePing Wang
Created2012-08-02T17:37:19.000+0000
Updated2017-03-09T23:45:59.000+0000

Description

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

Comments

  1. Ping Wang 2012-08-09

    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.
  2. Lee Morris 2017-03-09

    Closing this ticket as it is not our bug.

JSON Source