Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-17157] Android: Font property doesn't work for Picker and PickerColumn when keep {useSpinner: false}

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionFixed
Resolution Date2014-08-19T16:53:48.000+0000
Affected Version/sRelease 3.2.3
Fix Version/sRelease 3.4.0
ComponentsAndroid
Labelsandroid, fontsize, module_picker, picker, qe-manualtest, usespinner, view
ReporterFarhan
AssigneeSunila
Created2014-06-05T12:06:47.000+0000
Updated2014-08-19T16:53:48.000+0000

Description

On Android we can't change the font size of Picker when not using Spinner Theme. mean keeping *useSpinner: false* in property. Such kind of issue has also reported here: TIMOB-14007. But font size changes not work accordingly when do 'useSpinner' to 'false'.
Test Case Code:
-------------------------------------------
Ti.UI.backgroundColor = 'white';
var win = Ti.UI.createWindow({
  layout: 'vertical'
});
 
var picker = Ti.UI.createPicker({
  top:50,
  useSpinner: false,
  font: {fontSize: 80},  //font: {fontSize: 40},
});
picker.selectionIndicator = true;
 
var fruit = [ 'Bananas', 'Strawberries', 'Mangos', 'Grapes' ];
 
var column1 = Ti.UI.createPickerColumn({
    font: {fontSize: 80},  //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);
}

picker.add([column1]);
 
win.add(picker);
 
win.open();

Attachments

FileDateSize
1.png2014-06-05T12:06:47.000+000058104

Comments

  1. Ritu Agrawal 2014-06-13

    Moving this to engineering as I can reproduce the issue with the provided test case.
  2. Sunila 2014-06-18

    Added a customized adapter so that we can get the views to set the font. https://github.com/appcelerator/titanium_mobile/pull/5814
  3. Lokesh Choudhary 2014-08-19

    Verified the fix. Font property works as expected. Closing. Environment: Appc Studio : 3.4.0.201408051600 Ti SDK : 3.4.0.v20140815142514 Mac OSX : 10.8.5 Alloy : 1.4.1 CLI - 3.3.0 Code Processor: 1.1.1 Nexus 5 - android 4.4.4

JSON Source