Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-11966] Android: Views like labels, buttons, textfields in horizontal layouts do not respect width Ti.UI.FILL

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2013-04-19T01:02:44.000+0000
Affected Version/sRelease 2.1.4
Fix Version/s2013 Sprint 08 Core, 2013 Sprint 08, Release 3.1.1, Release 3.2.0
ComponentsAndroid
Labelscore, module_textfield, qe-closed-3.1.1, qe-testadded
ReporterAnirudh Nagesh
AssigneeAllen Yeung
Created2012-12-05T19:03:49.000+0000
Updated2013-10-03T09:11:15.000+0000

Description

Run the attached sample app.js and see the textfield does not respect Ti.UI.Fill and spills off to the next line. On iOS, textfield is fine and is expected behavior.

Attachments

FileDateSize
app.js2012-12-05T19:03:49.000+00001133

Comments

  1. Allen Yeung 2013-03-27

    https://github.com/appcelerator/titanium_mobile/pull/4045
  2. Allen Yeung 2013-04-22

    Backport to 3_1_X: https://github.com/appcelerator/titanium_mobile/pull/4206
  3. Federico Casali 2013-05-30

    Verified as fixed. Appcelerator Studio 3.1.1.201305292130 Titanium SDK 3.1.1.v20130529114554 Alloy 1.1.3-alpha Titanium-Code-Processor 1.1.3-alpha3 Alloy sample test:
       <Alloy>
       	<Window class="container">
       		<View id='fieldWrapper'>
       			<Label id='Label'></Label>
       			<View id='Spacer'></View>
       			<TextField id='textfield'></TextField>
       		</View>
       	</Window>
       </Alloy>
       
       ".container":{
       	backgroundColor:'white'
       }
       
       "#fieldWrapper":{
       	top: 0,
       	left: 0,
       	width: '100%',
       	height: Ti.UI.SIZE,
       	backgroundColor: '#ff0',
       	layout: 'horizontal'
       }
       
       "#Label":{
       	text: 'Test text field',
       	height: Ti.UI.SIZE,
       	width: Ti.UI.SIZE,
       	color: '#4b4b4b',
       	left: '3%',
       	backgroundColor: '#f0f'
       }
       
       "#Spacer":{
       	width: 10,
       	height: 10,
       	backgroundColor: '#0f0'
       }
       
       "#textfield":{
       	color: '#212e56',
       	width: Ti.UI.FILL,
       	right: '3%',
       	textAlign: 'right',
       	// text:'Label Text',
       	backgroundImage: 'none',
       	backgroundColor: '#00F',
       	hintText: 'hint text'
       }
       
    Closing.

JSON Source