Switch not appearing in listview on android 2.3.4

3 posts, 1 answers
  1. Grant
    Grant avatar
    1 posts
    Member since:
    Jun 2011

    Posted 17 May 2012 Link to this post

    Hi guys,

    I'm having an issue where i have a switch control (Based on a input tag with type set to checkbox) embedded in an item in a list view. 

    It works perfectly everywhere I test except on android 2.3.4 devices where it does not appear at all. (I have tested on a Samsung Galaxy S II and a Sony Xperia Arc S and it does not work on either phone)

    I'd like to note that it does work on these devices when it is outside of a list view (ul, li tags) but the minute I place it inside one it disappears.

    I use the following code in a view:

    <ul data-role="listview" data-style="inset" data-type="group">
            <li>
                Africa
                <ul>
                    <li data-icon="toprated"><input name="MyCheckBox" id="MyCheckBox" type="checkbox" data-role="switch"/></li>
                </ul>
            </li>
    </ul>


    Thanks,

    Rob
  2. Answer
    Alexander Valchev
    Admin
    Alexander Valchev avatar
    2875 posts

    Posted 23 May 2012 Link to this post

    Hi Rob,

    I tried to reproduce this issue using both the provided snippet and this official demo page, but to no avail. Do you experience the same problem while you browse this demo that uses switch control inside list view?

    Kind regards,
    Alexander Valchev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
  4. Grant
    Grant avatar
    1 posts
    Member since:
    Jun 2011

    Posted 23 May 2012 Link to this post

    Hi Alexander,

    Thanks for getting back to me. I tried the sample and it works fine so I managed to narrow it down to some css i had which was causing the problem. (I was setting the alignment of the switch to the right when I didn't need to to). Sorry about that.

    Thanks again!

    Rob
Back to Top