[TIMOB-26539] Android: Label's default font size should be "dp" unless explicitly set
| GitHub Issue | n/a | 
|---|---|
| Type | Bug | 
| Priority | Low | 
| Status | Closed | 
| Resolution | Fixed | 
| Resolution Date | 2018-11-29T18:36:12.000+0000 | 
| Affected Version/s | n/a | 
| Fix Version/s | Release 8.0.0 | 
| Components | Android | 
| Labels | android, breaking-change, font, label, parity, unit | 
| Reporter | Joshua Quick | 
| Assignee | Joshua Quick | 
| Created | 2018-11-09T04:02:33.000+0000 | 
| Updated | 2018-11-30T12:17:09.000+0000 | 
Description
	*Summary:*
Android's 
Ti.UI.Label is currently hard-coded to a font size of 15 using the "tiapp.xml" property's "ti.ui.defaultunit". The problem with this is if you set the default unit to pixels (ie: px), then the label will default to "15px" and be too small to read on high DPI devices. The label's default font size should be hard-coded to "dp".
We don't have this issue with any of our other UI features such as Button, TextField, Picker, etc. All other UI elements use "dp" by default. Only our Android Label has this problem.
iOS does not have this problem.
*Steps to reproduce:*
Create a Titanium classic app.
Set up the "tiapp.xml" file's default unit to "px" (pixels) as shown below.
Use the "app.js" below.
Build and run on an Android device that is xxhdpi or higher.
Notice that the text is very tiny. _(This is the bug.)_
tiapp.xml
<ti:app xmlns:ti="http://ti.appcelerator.org">
	<property name="ti.ui.defaultunit" type="string">px</property>
</ti:app>
var window = Ti.UI.createWindow();
window.add(Ti.UI.createLabel({ text: "Hello World" }));
window.open();
Attachments
| File | Date | Size | 
|---|---|---|
| Android-dp.png | 2018-11-09T04:01:04.000+0000 | 43232 | 
| Android-px.png | 2018-11-09T04:01:04.000+0000 | 40168 | 
| ios-dp.png | 2018-11-09T04:01:04.000+0000 | 101022 | 
| ios-px.png | 2018-11-09T04:01:04.000+0000 | 101117 | 
PR (master): https://github.com/appcelerator/titanium_mobile/pull/10450
FR Passed. Waiting for CR to merge.
PR Merged.
*Closing ticket* Fix verified in SDK Version
8.0.0.v20181129161342. Test and other information can be found at: https://github.com/appcelerator/titanium_mobile/pull/10450