Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-7257] Android: TextField - Default font behavior is not consistent with other platforms

GitHub Issuen/a
TypeBug
PriorityLow
StatusClosed
ResolutionWon't Do
Resolution Date2020-01-09T19:37:17.000+0000
Affected Version/sRelease 2.0.0, Release 3.1.0
Fix Version/sn/a
ComponentsAndroid
Labelsapi, parity
ReporterChris Barber
AssigneeIngo Muschenetz
Created2012-01-17T10:42:01.000+0000
Updated2020-01-09T19:37:17.000+0000

Description

Creating a TextField without a "font" property sets the font size to something huge.
var textField = Ti.UI.createTextField({
	height: 50,
	top: 40,
	left: 20,
	right: 20
});
Just setting the "font" property to an empty object will set it to the correct size:
var textField = Ti.UI.createTextField({
	height: 50,
	top: 40,
	left: 20,
	right: 20,
	font: {}
});
On iOS and mobile web, if you do not set a font, the default is acceptable.

Attachments

FileDateSize
Screen Shot 2012-01-17 at 10.39.58 AM.png2012-01-17T10:42:13.000+0000120521
Screen Shot 2012-01-17 at 10.41.52 AM.png2012-01-17T10:42:13.000+0000120365

Comments

  1. Chris Barber 2012-01-17

    First screenshot is WITHOUT the font property and the default font size is huge. The second screenshot is WITH an empty font property and the default font size looks acceptable.
  2. Shameer Jan 2013-03-01

    The problem exist with release 3.0.2 and master release 3.1.0 Tested on: Titanium Studio, build: 2.1.2.201208301612 Titanium SDK version: 3.1.0 (01/03/2013) Titanium SDK version: 3.0.2 (01/03/2013) Device: Samsung galaxy s duos Android version: 4.0.4
  3. Biju pm 2014-02-21

    Is this consider as a bug or a feature ? If we create a TextField without a font property it takes android default font behavior otherwise it takes titanium default font (fontFamily) property that is SANS_SERIF
  4. Alan Hutton 2020-01-09

    It has been decided that this issue should be closed as “Won’t do.” This issue is out of date with our current supported SDK release (7.5.2.GA as of the date of closure), and out of date with mobile OS versions. If community members feel that the issue is still valid, please create a new ticket. Please reference this closed ticket number, include SDK used, comments, and code that demonstrates/reproduces the issue.

JSON Source