Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-26804] Implement Padding property for all Views

GitHub Issuen/a
TypeNew Feature
PriorityNone
StatusOpen
ResolutionUnresolved
Affected Version/sn/a
Fix Version/sn/a
ComponentsTiAPI
Labelsmargin, padding
ReporterBrenton House
AssigneeUnknown
Created2019-02-06T18:34:12.000+0000
Updated2020-03-06T16:51:27.000+0000

Description

Add Padding property to Ti.UI.View. We currently have Padding for TextField and TextArea but not on View or most other controls.

Comments

  1. Joshua Quick 2019-02-06

    Would you mind splitting this into 2 feature tickets please? One for padding support. The other for margin support. I'm less keen on implementing margin support *+at the moment+* since it involves mucking with our layout handling code on all platforms and has a much higher risk of breakage/regressions. *+Yes+*, this would be a great feature to add... but it literally took us years to get our layout handling in parity between platforms (the same was true with web browsers). Particularly when it comes to conflicting layout settings. I don't see us doing margin support in the "near" future. I'm not saying never. Just that "now" is not the time. _Note: You can implement your margin support by wrapping a view within a view and setting the left/top/right/bottom properties to the margins you want. Just be warned that Android has a limit to how deeply nested your view hierarchy can be and will refuse to render views that are too deep. (Nothing is ever easy.)_ Padding support should be easier to implement than margins, hence why the 2 features should be separate tickets. Just note that when it comes to labels/text, padding won't be pixel-perfect between platforms since each platform (iOS, Google, Windows) has completely different text rendering systems and text will appear slightly different between them. I know that the Chrome web browser gets around this by bundling its own text rendering library on all platforms to make text rendering consistent. We don't really have that option (text rendering libraries tend to be super huge). Anyways, that's my 2 cents. :) I'm just trying to set some realistic expectations.
  2. Brenton House 2019-02-06

    [~jquick] - Done!
  3. Brenton House 2020-02-24

    [~jquick] - Any way we can fit this into one of our upcoming releases?
  4. Brenton House 2020-03-06

    [~amukherjee] Up to 52 likes for this feature on slack! :) https://ti-slack.slack.com/archives/C0B2EUWRK/p1582556990002600

JSON Source