Titanium JIRA Archive
Appcelerator Community (AC)

[AC-4251] Android Dialog androidView and padding

GitHub Issuen/a
TypeBug
Priorityn/a
StatusClosed
ResolutionNeeds more info
Resolution Date2016-08-02T18:45:31.000+0000
Affected Version/sn/a
Fix Version/sn/a
ComponentsTitanium SDK & CLI
Labelsandroid
ReporterBaharroth
AssigneeShak Hossain
Created2016-07-27T14:03:11.000+0000
Updated2016-08-02T18:45:31.000+0000

Description

In dialog, if you insert a custom view with the androidView property, if this view has top/left/button/right, it won't work... What a pity, because on Android Material (following guideline): Left/Right : '20dp'. Workaround is to insert a parent view just for the padding but it's not best pratice
  var dialog = Ti.UI.createAlertDialog({
    message: 'Bla Bla Bla Bla Bla ',
    androidView = Ti.UI.createLabel({
			top : '24dp',
			left : '20dp',
			backgroundColor : 'red')}
  });
  dialog.show();

Attachments

FileDateSize
Screenshot_2016-07-27-15-56-59.png2016-07-27T14:03:07.000+000072115

Comments

  1. Hans Knöchel 2016-07-27

    Well, a label is no view. Did you try wrapping it into a view? Pretty sure I did some spacing in the custom-view in the past and it worked.

JSON Source