Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18057] Android: Setting "backgroundColor" on a Window or View hides the TextFields grey underline denoting that it is editable

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionCannot Reproduce
Resolution Date2017-07-26T18:13:03.000+0000
Affected Version/sRelease 3.4.0
Fix Version/sn/a
ComponentsAndroid
LabelsTCSupportTriage, android, border, focus, line, textfield, underline
ReporterDan Roberts
AssigneeEric Merriman
Created2014-10-16T07:12:15.000+0000
Updated2017-07-26T18:13:03.000+0000

Description

Problem Description

In the Android OS TextFields should have a grey/black line underneath them when they are unfocused so users can see that it is an editable field. This line is not visible when the "backgroundColor" style is applied to any Windows/Views containing TextFields. This is a significant issue as it makes all TextFields look like Labels. The blue "focused" line appears ok.

Steps to reproduce

1. Create a simple project. 2.Update app.js with test code
 
var win = Ti.UI.createWindow({
  backgroundColor: '#fff',
  exitOnClose: true,
});

var aTextField2 = Ti.UI.createTextField({
	height : 35,
	top : 10,
	left : 40,
	width : 240,
	hintText : 'This is hint text',
	softKeyboardOnFocus : Ti.UI.Android.SOFT_KEYBOARD_DEFAULT_ON_FOCUS, // Android only
	keyboardType : Ti.UI.KEYBOARD_DEFAULT,
	returnKeyType : Ti.UI.RETURNKEY_DEFAULT,
	borderStyle : Ti.UI.INPUT_BORDERSTYLE_ROUNDED
});
win.add(aTextField2);

var aTextField = Ti.UI.createTextField({
	height : 35,
	top : 100,
	left : 40,
	width : 240,
	hintText : 'This is hint text',
	softKeyboardOnFocus : Ti.UI.Android.SOFT_KEYBOARD_DEFAULT_ON_FOCUS, // Android only
	keyboardType : Ti.UI.KEYBOARD_DEFAULT,
	returnKeyType : Ti.UI.RETURNKEY_DEFAULT,
	borderStyle : Ti.UI.INPUT_BORDERSTYLE_ROUNDED
});
win.add(aTextField);
win.open();
3. Run on android device

Comments

  1. Lee Morris 2017-07-26

    I am unable to reproduce this issue with the following environment; Pixel (7.1) Studio 4.9.0.201705302345 Ti SDK 6.1.1 GA Appc NPM 4.2.9 Appc CLI 6.2.2 Ti CLI 5.0.14 Alloy 1.9.11 Xcode 8.2 (8C38) Node v4.8.2 Java 1.8.0_131

JSON Source