Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-9008] Android: UI.Switch - STYLE_CHECKBOX text should be on left rather than right

GitHub Issuen/a
TypeBug
PriorityMedium
StatusClosed
ResolutionInvalid
Resolution Date2013-02-28T11:10:31.000+0000
Affected Version/sRelease 2.0.1
Fix Version/sRelease 3.0.2
ComponentsAndroid
Labelsapi, ipass1
ReporterPaul Dowsett
Assigneejithinpv
Created2012-05-06T07:44:46.000+0000
Updated2017-03-20T22:02:09.000+0000

Description

Problem

In all the apps that I can recall on Android, the text next to checkboxes usually appears on the left. I appreciate this may be a subjective opinion, so please get other opinions and resolve or close this ticket as necessary. See attached screenshot.

Test Case

var win = Ti.UI.createWindow({
  backgroundColor: 'white'
});

var basicSwitch = Ti.UI.createSwitch({
	color: 'black',
	style: Ti.UI.Android.SWITCH_STYLE_CHECKBOX,
	textAlign:Ti.UI.TEXT_ALIGNMENT_RIGHT,
	title:'Notifications',
	value:true,
	width: 300
});
win.add(basicSwitch);

basicSwitch.addEventListener('change',function(e){
	Ti.API.info('Switch value: ' + basicSwitch.value);
});

win.open();

// print initial value
Ti.API.info('Switch value: ' + basicSwitch.value);

Attachments

FileDateSize
5560_titanium_4_WVGA800.png2012-05-06T07:46:11.000+000025979

Comments

  1. Ivan Skugor 2012-05-07

    I totally agree.
  2. jithinpv 2013-02-28

    This nature is same as the native android behavior. So it cannot be treated as a bug.
  3. Lee Morris 2017-03-20

    Closing ticket as invalid.

JSON Source