Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-14007] Android: Font property doesn't work for Picker and PickerColumn

GitHub Issuen/a
TypeBug
PriorityHigh
StatusClosed
ResolutionFixed
Resolution Date2014-05-08T16:33:38.000+0000
Affected Version/sRelease 3.1.3, Release 3.2.0
Fix Version/s2014 Sprint 09, 2014 Sprint 09 SDK, Release 3.3.0
ComponentsAndroid
Labelsmodule_picker, qe-closed-3.3.0, qe-testadded, supportTeam
ReporterPing Wang
AssigneeBiju pm
Created2013-05-28T20:25:37.000+0000
Updated2014-06-13T17:25:54.000+0000

Description

Test case for PickerColumn:
Ti.UI.backgroundColor = 'white';
var win = Ti.UI.createWindow({
  layout: 'vertical'
});

var picker = Ti.UI.createPicker({
  top:50,
  useSpinner: true
});
picker.selectionIndicator = true;

var fruit = [ 'Bananas', 'Strawberries', 'Mangos', 'Grapes' ];
var color = [ 'red', 'green', 'blue', 'orange' ];

var column1 = Ti.UI.createPickerColumn({
	font: {fontSize: 40},
	height : Ti.UI.SIZE,
	width : Ti.UI.SIZE
});

for(var i=0, ilen=fruit.length; i<ilen; i++){
  var row = Ti.UI.createPickerRow({
    title: fruit[i]
  });
  column1.addRow(row);
}

var column2 = Ti.UI.createPickerColumn({
	height : Ti.UI.SIZE,
	width : Ti.UI.SIZE
});

for(var i=0, ilen=color.length; i<ilen; i++){
  var row = Ti.UI.createPickerRow({ title: color[i] });
  column2.addRow(row);
}

picker.add([column1,column2]);

win.add(picker);

win.open();
Test case for Date Picker:
Ti.UI.backgroundColor = 'white';
var win = Ti.UI.createWindow({
  layout: 'vertical'
});
 
var picker = Ti.UI.createPicker({
  type:Ti.UI.PICKER_TYPE_DATE,
  minDate:new Date(2009,0,1),
  maxDate:new Date(2014,11,31),
  value:new Date(2014,3,12),
  font: {fontSize: 40},
  top:50,
  useSpinner: true
});
 
win.add(picker);
win.open();

Comments

  1. Biju pm 2014-01-09

    PR:- https://github.com/appcelerator/titanium_mobile/pull/5198
  2. Priya Agarwal 2014-05-05

    Verified with test environment: Appc-Studio:3.3.0.201405011408 sdk:3.3.0.v20140502133323 acs:1.0.14 alloy:1.4.0-dev npm:1.3.2 titanium:3.3.0-dev titanium-code-processor:1.1.1 xcode:5.1.1 Device:LG-P970(V4.0.4) Font property for Picker and Picker Column is working fine. But it is not working fine on iOS. Font Size and FontWeight does not show any differences.

JSON Source