Dojox.mobile.switch not working on Android

635
2
07-11-2013 12:22 AM
DavidRaijmakers
New Contributor III
I am using the API v 3.5 and our company recently wants to produce for Android.

i made a mobile viewer with dojox mobile switches, but on android these are not working, they stick at half and the function wich detects the change of the mobile switch isnt called.

<div dojoType="dojox.mobile.RoundRect" shadow="true">
  <span class="bold">POI Data</span><br>
  
  <div class="mblSwRoundShape1 color1" id="switchPOI" dojoType="dojox.mobile.Switch" value="off" leftLabel="AAN" rightLabel="UIT"></div>
 </div>

dojo.connect(dijit.byId("switchPOI"), "onStateChanged", function(newState){
   POI(newState); // newState is "on" or "off"
});


I already saw a post from dojo that there was a bug: https://bugs.dojotoolkit.org/ticket/15936
But it was already fixed in 1.8.1, and the API for JS uses 1.8.3, so why is this problem still occurring?

Version 3.5 of the ArcGIS API for JavaScript uses Dojo 1.8.3 as well as version 0.3.4 of dgrid, 0.3.1 of put-selector and 0.0.5 of xstyle.


Here's a picture to show what i mean, keep in mind that the function isn't called when the switch is slided like this:

[ATTACH=CONFIG]25865[/ATTACH]
0 Kudos
2 Replies
DavidRaijmakers
New Contributor III
No one has a workaround, or knows when it'll be fixed?
0 Kudos
RobSpeer
New Contributor II
Hi David, it's been awhile since this post but if it still helps, try changing your switch tags from from <div> to <input>.
0 Kudos