Community Questions & Answers

Switch BTN

<Switch id="basicSwitch" value="true" onChange="outputState"/> "#basicSwitch":{ top:"880", right:"20", titleOff:"", color:"red" } Hy Folks, Is it possiable to...

Customize Switch

Hi Everyone, Is it possible to change the image that is used in a switch for IOS. I see there is a background image property but when I apply my image nothing changes. I am using the latest version of the TI Studio and SDK. Thanks in advance Sean

Switch changes state when rendered (to late)

My iOS example: I placed a Ti.UI.Switch in every table row of a table. If the state is set to "ON", the switch changes it state to "ON" with an animation as soon it gets rendered (scrolls into the visible screen) and unfortunately not...

Toggle Switch

I need to create a Toggle Switch that will interact with other elements like changing the left property of an element. I looked at this and its examples( http://docs.appcelerator.com/titanium/latest/#!/api/Titanium.UI.Switch ) but Im not sure if it would...

Black Switch

Hi, This is drive me crazy. How can I create standard switch with black color - not default blue. Is it possible, at all. I tried almost everything. Please, help me. Kind regards, TM

how this UI element is called in Titanium?

I'm kind-a confused in here.. This switch is in Android preferences, I mean this should by default for everything that's called SWITCH. Titanium switch which I tried is just a toggle-button instead of actual switch as in the picture.. please tell me it's...

Cannot resize switch

I am a bit puzzled that the switch will not resize. Is it not resizable? Testing in IPhone simulator. Interested in height only. ~~~ var my_swch = Titanium.UI.createSwitch({ value:false, top:15, right:10, height:55, ...

how to set size for Titanium.UI.Switch?

In this docs I can see property "Size" https://developer.appcelerator.com/apidoc/mobile/1.0/Titanium.UI.Switch When I try to set it like this ~~~ 1 var win = Ti.UI.currentWindow; 2 3 win.title = L('windowTracking'); 4 5 var SwitchTracking =...

Switch TitleOn and TitleOFF

I have created a switch and wen i turn on it shows a green bar else nothing....this working fine on my emulator but not working in the device ....

swith title on, title off on iphone

Hi, i want to set a value when switch is on and another value when switch is false (like oui and non in french or I/O) on iphone...i used titleon and titleoff but it doesnt work... can anyone help me please.. thank you..

Create android switch button

Can I create android 4.0 switch button (not checkbox or toggle button) with Titanium? example of on/off switch ![switch] (http://developer.android.com/design/media/settings_master_on_off_2.png) #### thanks,

Switch "ON" then fire event across whole app

I am looking at adding a switch to a page in an app and adding a fire event to it. When the switch is "ON" I would like it to increase the text size on each page of the app by 2-4 point. Any help on this would be great.

Switch widget iOS not always displaying

Hi all, I have a TableView consisting of custom TableViewRow objects which include a View housing a Label and a Swtich object. When the view is displayed, the Swtch objects are sometimes displayed, sometimes not displayed. Sometimes the Switch objects...

e.source what type of ?

Hey, i have a tableviewrow and on it there is a Button. Now i wanna do 2 different functions, if the user presses the row or the button instead. ~~~ eventTableView.addEventListener('click', function(e) { /*Ti.App.fireEvent('app:event.select',...

Device Token for push

Hi, my application need to enable and disable (switch) the push notification. So my idea is to store device token to external MYSQL to push (I've got my own server setting up for push) and insert or delete to MYSQL. I have two problems: 1 - How to get...

Switch BackgroundColor

Hey there, Can someone please hack the native code of the UISwitch and implement the property `onTintColor` ? It can be used since iOS 4.0 to change the blue backgroundColor of switches to custom ones but i can't find that property in Ti-Mobile,...

Switch changing while loading

I created an Iphone switch and set the value to true. ~~~ var switch1 = Titanium.UI.createSwitch({ value:true, top:70, right:50 }); ~~~ My problem is when the window opens the switch quickly goes from off to on instead of loading in the on state. I...

Switch values

Is there anyway to change the values of a switch from "on / off" to yes / no? Iphone, SDK 1.8.2

Weird Switch Problem

I am using the following code to set switches for FB and Twitter (birdhouse) upon opening the app (apps.js): ~~~ Ti.App.addEventListener('shareauth', function(e){ if (bh.authorized()==false){ twitterSwitch.value = false; } else...

Switch between views in a window

Hello, I currently have a set of tabs in my app each referring to some .js file. I would like to change one of these tabs to have a toolbar at the top with two buttons Option A and Option B. When the user clicks Option A then option_a.js should be...

Array of UI elements?

Hello, Is it possible to create a dynamically generated array of UI elements? For example, I'd like to download a list of string and attach a Titanium.UI.Switch to each string. I tried something like that but it didn't work: ~~~ var switchArray =...

navigating among windows

i am trying to switch from one window to another and back to the previous one ... but while doing so when i switch back to the first window .. the elements (buttons, views) are disabled and logcat shows that i am clicking on the window... here are my...

Showing 1-50 of 74 1 2