This is a migrated thread and some comments may be shown as answers.

List View and Drawer issues

3 Answers 100 Views
ListView (Mobile)
This is a migrated thread and some comments may be shown as answers.
George
Top achievements
Rank 1
George asked on 08 Oct 2013, 04:36 PM
I have a listview being populated by some json data. I have the elements in the listview linking to a details page. All is working fine.
when i add drawers to the page thats when it breaks. when i swipe it thinks im clicking so it tries to open the drawer and the details view at the same time making for some interesting behaviour.

how can i combat this?



<!--LISTVIEW DATA--> 
<script id="alertlist" type="text/x-kendo-template">
      <a class="details-link" data-role="listview-link" href="\#details?alert_ID=#=alert_ID#">
        <img class="alertimage" src="/images/#: degree #.png" />
      </a>
      <div class="listviewdiv">
        <h3 class="item-info">#: title #</h3>
        <p class="item-title">#: sentDT # <span class="AlertTitle"> :: #: sender # </span></p>       
      </div>
      <a data-role="button" href="\#details?alert_ID=#=alert_ID#" class="listviewbutton" data-icon="mostrecent"></a>    
  </script>


<ul id="alert-list-scroll" data-role="listview" data-source="IRISalerts" data-click="listViewClick"  data-template="alertlist"></ul>

3 Answers, 1 is accepted

Sort by
0
Petyo
Telerik team
answered on 10 Oct 2013, 03:11 PM
Hi George,

indeed the behavior in this case is interesting. We are still pondering on an the best way to handle it. The two widgets in fact exhibit somewhat contradicting behavior: 

- The iOS tableview navigates when tapped or swiped (as long as you swipe across one item). You can check this in the iOS settings screen, for instance.
- The drawer also handles the swipe event. 

Neither widget can claim rights over the swipe gesture; If the listview handles it, the drawer will not open on swipe. If the drawer handles it, the listview (and several other widgets) will suffer from reduced usability, as they will be affected only by precise taps. 

In our next release, the drawer will feature a new configuration option - swipeToOpen. If set to false, the drawer will not open on swipe, yielding somewhat better behavior than the current.

In case you have any suggestions about the correct way to handle it, do not hesitate to share them with us. 

Regards,
Petyo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
George
Top achievements
Rank 1
answered on 10 Oct 2013, 03:20 PM
thanks for the reply!
Is there any way to have the listview only link to the details view on tap? Im not really swiping to get to the details view but im swiping to open the drawer but when i swipe it just so happens my finger is over an <a> tag. 

Also, this is on Android.

To put it another way, on your examples. I can scroll down a list view all day long but action doesn't happen until i tap on an item...
0
Petyo
Telerik team
answered on 11 Oct 2013, 08:56 AM
Hi George,

Vertical scrolling is a special case, indeed. it is handled by the scroller widget, which captures the events in order to prevent the containing widgets from registering it as a tap.  

Configuring the listview to accept taps only sounds like a viable approach, however it is not currently exposed as a configuration option. I will log this idea as an enhancement for our next major release. Thank you once again for the feedback. 

Regards,
Petyo
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
ListView (Mobile)
Asked by
George
Top achievements
Rank 1
Answers by
Petyo
Telerik team
George
Top achievements
Rank 1
Share this question
or