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

List-View width getting reduced on every click in Android

7 Answers 72 Views
ListView (Mobile)
This is a migrated thread and some comments may be shown as answers.
Sowmya
Top achievements
Rank 1
Sowmya asked on 19 Aug 2013, 09:25 AM
Hi,
       Width of the List-view gets reduced on every click in Android(tested in S3),PFA the sample project.
Version Used: KendoUIMobile.2013.2.716.Commercial.

Regards,
Sowmya

7 Answers, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 20 Aug 2013, 02:34 PM
Hello Sowmya,

I have reviewed your project and the problem comes from the fact that you are removing the data in the ListView using the .html() jQuery method. This does not remove the widget itself, but the html elements, so when you go back and forth it creates ListView over a ListView. This causes the behaviour in Android and in iOS it causes a performance issue - after a few clicks the app becomes unresponsive.

You can remove the ListView using its built-in .destroy() method. Or you can implement dataSource that you can use to bind(change) the data in the ListView, based on the desired functionality.
 
Regards,
Kiril Nikolov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Sowmya
Top achievements
Rank 1
answered on 21 Aug 2013, 12:47 PM
Hi,
Thanks for your reply.
Tried the following code but still facing the same issue,
        Added  var listView = $("#idList").data("kendoMobileListView");
          listView.destroy();
and removed the $("#idList").html("")
P.S:The same code was working fine in the previous version of kendo release(v2013.1.514)

Regards,
Sowmya
0
Kiril Nikolov
Telerik team
answered on 23 Aug 2013, 10:42 AM
Hi Sowmya,

The problem comes from the fact that the ListView is nested inside the "clsDivList" multiple times, which causes the ListView to shrink as the div is nested inside. The whole approach you are using might not be the optimal one. Do you necessarily need to use only one view in your application? Please take a look at the Hierarchical ListView  demo on our side, as it might help you getting started with your application:

http://demos.kendoui.com/mobile/listview/hierarchical-databinding.html
 
Regards,
Kiril Nikolov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Sowmya
Top achievements
Rank 1
answered on 27 Aug 2013, 06:54 AM
Hi,
Thanks for your reply.
          As Hierarchical list view is the latest feature,We were using only one view and we do not have enough time in between  to change the complete list  to hierarchical list now.Is there any other alternate way to avoid this issue,so that we can continue with this approach?
        Please reply asap.Thanks in advance.

Regards,
Sowmya


0
Kiril Nikolov
Telerik team
answered on 29 Aug 2013, 07:39 AM
Hello Sowmya,

First of all I would like to apologize for the delayed answer.

As you do not want to change to Hierarchical ListView, I can see that you are using static date and templates alon with the same value property. This is why I would suggest you to just change the dataSource of the ListView based on the requirements and the data that you want to show. Please take a look at the following example:

http://jsbin.com/AjeXojA/2/
 
Regards,
Kiril Nikolov
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
akshay
Top achievements
Rank 1
answered on 30 Aug 2013, 12:47 PM
Hi Nikolov,

I am trying to bind the Hierarchical datasource to listview.
I am using the latest kendoui.mobile.2013.2.716 version.

I can see only the root element and not able to navigate to child elements on click of the list item.
PFA the sample application.

Is it not possible to navigate to child elements when we bind hierarchical datasource to listview ?

Any help is appreciated.

Thanks,
Akshay
0
Petyo
Telerik team
answered on 03 Sep 2013, 10:43 AM
Hello Akshay,

In order for a child navigation to occur, certain template markup and listview rebinding needs to be applied. Please check this demo for a functional example.

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
Sowmya
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Sowmya
Top achievements
Rank 1
akshay
Top achievements
Rank 1
Petyo
Telerik team
Share this question
or