[TIMOB-16512] Android: Expose properties/methods for controlling internal padding in TextField (and possibly TextArea)
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Low |
Status | Closed |
Resolution | Fixed |
Resolution Date | 2016-06-27T07:12:40.000+0000 |
Affected Version/s | Release 3.2.1 |
Fix Version/s | Release 6.0.0 |
Components | Android |
Labels | internalmargin, padding, textfield |
Reporter | Brian Burgess |
Assignee | Ashraf Abu |
Created | 2014-02-22T04:42:16.000+0000 |
Updated | 2016-11-16T19:21:28.000+0000 |
Description
sometimes, particularly with smaller screen devices, and/or with short fields (like intended only for 1 or 2 characters), the text can get chopped off unexpectedly on either the top, right or the bottom. This seems to be because the internal 'padding' or margins are NOT scaled according to screen size.
TextField supports multiple padding properties (for example, paddingLeft and paddingRight) for iOS platform. Are you looking for the same properties on Android platform? Please confirm. http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.TextField-property-paddingLeft
Yes Ritu, This is correct. These Ti.UI.TextField properties have no effect on Android. However they are available in native Android (JAVA). I'm just looking to have them 'exposed' to android in Ti. Much Thx
Moving this enhancement request to engineering. It would bring Android platform to parity with iOS platform.
Test case :
PR :- https://github.com/appcelerator/titanium_mobile/pull/5492
Not sure why this is a low priority issue, or are all Android bugs/features low priority? I'd love to develop purely for iOS, but unfortunately there are plenty of titanium developers out here that have no choice but to develop for both (the reason they chose Titanium in the first place). Would be nice if you guys at Appcelerator acknowledged this at some point.
Please expose those properties to avoid behavior, mentioned in TC-4536.
Found workaround, using styles:
Any workaround for a classic App?
Yes, this is for classic app. Solved a lot of crappy problems at once with that. Refer to http://docs.appcelerator.com/titanium/3.0/#!/guide/Android_Themes for details.
Awesome, thanks!
I've updated the PR: https://github.com/appcelerator/titanium_mobile/pull/7908 !http://www.migaweb.de/ti_padding.png!
changing to hashmap
Will merge this once we are ready for 6.0.0.
[~michael], I've left a few comments in the PR, please address them. Thanks!
Hieu Pham, should all be fixed now
Thanks, looks good man!
PR https://github.com/appcelerator/titanium_mobile/pull/7908 merged.
Verified the implementation. Closing. Environment: Appc Studio : 4.7.1.201608190732 Ti SDK : 6.0.0.v20160822001523 Ti CLI : 5.0.9 Alloy : 1.9.1 MAC El Capitan : 10.11.6 Appc NPM : 4.2.7 Appc CLI : 6.0.0-26 Node: 4.4.4 Nexus 6 - Android 6.0.1