[AC-4251] Android Dialog androidView and padding
| GitHub Issue | n/a |
|---|---|
| Type | Bug |
| Priority | n/a |
| Status | Closed |
| Resolution | Needs more info |
| Resolution Date | 2016-08-02T18:45:31.000+0000 |
| Affected Version/s | n/a |
| Fix Version/s | n/a |
| Components | Titanium SDK & CLI |
| Labels | android |
| Reporter | Baharroth |
| Assignee | Shak Hossain |
| Created | 2016-07-27T14:03:11.000+0000 |
| Updated | 2016-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
| File | Date | Size |
|---|---|---|
| Screenshot_2016-07-27-15-56-59.png | 2016-07-27T14:03:07.000+0000 | 72115 |
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.