How to remove default padding from the listview and how to apply background color

Lakshmikanth

When looking at the Twitter example I have adapted it with my own data.

http://demos.kendoui.com/mobile/listview/pull-with-endless.html

I need to make a slight change:1. In android mobile the default background color of listview is black but i want to change it to different color(yellow) 2. Also there is default padding(some space around each row) but i want it to remove(i,e padding=0).3. When tapping each 'row' I want it to highlight by red for few seconds

Alexander Valchev

1. In android mobile the default background color of listview is black but i want to change it to different color(yellow).

Generally speaking, you can inspect the currently applied CSS rules for Android platform and override them. If you are not very convenient with CSS, I recommend you to use the ThemeBuilder tool which will allow you to customize the default android theme using drag 'n' drop.

2. Also there is default padding(some space around each row) but i want it to remove(i,e padding=0).

Please use the following CSS:

#listview > li {

padding: 0;

}

/* where #listview is the ID of your ListView */

3. When tapping each 'row' I want it to highlight by red for few seconds

By default the framework will highlight the touched item if its an <a> element (demo). You can customize the highlight color with the aforementioned ThemeBuilder tool. If that does not suit in your case, you may use the touch events. For example - highlight on touchstart and remote the background color on hold.

when i click on list-view onclick function will invoke.
Inside onclick i am calling some web-services it taking some time to get a response from the server(around 2 seconds).In that 2 seconds i am able to click another list-view. so can you please tell me how to implement loader(like some animation) or how to disable a page till i get response from the server

Alexander Valchev

Yes, the loader does not prevent the user from interacting with the ListView. Please accept my apology for the inconvenience caused.

To disable the clicks you could append an overlay element that covers the whole document.body element. This will prevent the user from clicking anywhere, until the overlay is removed on $.ajax success.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks or appropriate markings.