listview

ListView equivalent using jQuery

I am transitioning a WPF application to the Web using ASP.Net MVC and jQuery. In my WPF application I have a ListView containing thumbnails and captions that looks like this: I need to display something similar in my web-based application. Requirements: User must be able to select items in the list (multiple selection would be usef...

ListView - Show LayoutTemplate on empty data source

For a shopping cart page, the list of items is displayed in a html table. I use a ListView for that and it works great. When the cart is empty, the text 'This cart is empty' appears. But it only renders the code in the EmptyDataTemplate. My goal is to display the table headers ('delete', 'product', 'quantity', etc.) without repeating th...

Android: Control ListView Scroll Animation Interval?

Is it possible to set up a ListView so when it scrolls it only scrolls in intervals related to the height of the List Item. In other words if my item height is a number h and a swipe of the list is given a number p to represent how hard the swipe is so it can go further if the swipe is harder is it possible to set the ListView so that it...

android listview problem, override getView() but it never be invoked.

I override the function getView(), but when debug I found it never be invoked, really weird... public class EntriesActivity extends ListActivity { private static final String TAG = "EntriesActivity"; private EntriesAdapter mArrayAdapter; private List<Entry> mEntries = new ArrayList<Entry>(); String mGoalId; @Override protected ...

ListView using String Array

How can I give values to ListView? When I am trying to create a ListView using String array, my process is suddently stopped. public String[] items_list=new String[100]; items_list[0]="11"; items_list[1]="22"; items_list[2]="33"; items_list[3]="44"; ListView listitems=(ListView)findViewById(R.id.list); ...

Why is ListView.getCheckedItemPositions() not returning correct values?

The app has a ListView with multiple-selection enabled, in the UI it works as expected. But when I read the values out using this code: Log.i(TAG,"Entered SearchActivity.saveCategoryChoice()"); SparseBooleanArray checkedPositions = categorySelector.getCheckedItemPositions(); Log.i(TAG,"checkedPositions: " + checkedPositions.size()); if ...

How to set item renderer for ListView in ext-gwt?

I have a ListView in ext-gwt and I'm adding some custom data to it. How can I set an item renderer on the ListView? As of right now, whenever an item is added, there's just a small line representing each entry in the view. Here's my basic code: import com.extjs.gxt.ui.client.store.ListStore; import com.extjs.gxt.ui.client.widget.Lis...

Change background color of cell (not control) in ListView

What or where in the code do I set the color for this background? ...

Radio button click doesn't register inside ListView

Hi! I have a radiobutton group in Android that I populate with data from a database. To get the data to show next to each radiobutton I have used the ListAdapter: String[] columns = new String[] {DataHelper.KEY_WORD, DataHelper.KEY_ALT1 , DataHelper.KEY_ALT2 ,DataHelper.KEY_ALT3 ,DataHelper.KEY_ALT4 }; // the XML defined vi...

C# : How to add data data from a ListView control to a Dictionary.

The list view is like i need to add the data from the Listview to a Dictionary<String,String>. Now i'm using for loop to do this. Is there any way to do this using LINQ. Finally the Dictionary will contain {"A","1"} {"B","2"} {"C","3"} EDIT My code : Dictionary<String, String> Dic = new Dictionary<string, string>(); ...

Android : Skipping to Listview position given input char or string

Hello, Can someone tell me how to skip to a position in an alphabetically sorted ListView when given a char or string input from an onClick method? For example, I have a dialog that passes back a char. If that char is a B I want the listview to skip to the first B entry. Any help would be greatly appreciated. Thanks, Josh ...

Alternate Color in ListView C# (.Net 3.5) ?

I'm gonna set an alternate color to my ListView rows. I saw this link but I'm using .Net Framework 3.5 SP1 , so I can't use it. I've used the following code , but it has problem with ListView Sorting ListViewItem newListViewItem = new ListViewItem( new string[] { item.name.ToString(), item.code.ToString() }); new...

How to save the instancestate of my activity

I obviously new and have been trying to two days to figure out how to save the state of my main activity to no avail. I would appreciate any help. When I launch the ShowDetail activity and return to the main activity I have no data in the list. I have two xml files a main.xml and a item.xml file. main is just a listview and a textview. I...

android widget ListView: how do I wait until it's loaded up?

I'm using a ListView with an ArrayAdapter, and code executing after ListView.setAdapter(ArrayAdapter,...) is seeing ListView.getChildCount()==0. Is there a way t wait for the UI thread to finish filling the ListView before continuing? Thanks in advance, Lenny ...

Custom ArrayAdapter setBackground in getView

I'm working on a ListActivity which will display a bunch of numbers (weights). I would like to change the background of a specific row in the ListView. To do this I have created a custom implementation of the ArrayAdapter class and have overridden the getView method. The adapter accepts a list of numbers and sets the background of the ro...

Lazy loading from SQLite.

I have some 4500 entries in my database. What is the best way to show them in a ListView. Should I load them all in one stretch when the application initializes or should I use lazy loading? The list will also be searchable and filterable. Could you also point me to some nice articles that would gimme a better idea. Please do give me sug...

Android: How do I assign each of my ListView list items an individual icon?

Hi, I'm very new to Android delelopment, searching and reading various tutorials and using different parts of code from around the internet, trying to make sense of it as I go. Forgive me if my explanation isn't too great. Currently I have a list created with 4 list items, what I'd like to do is assign a different icon to each of these...

android listview refresh problem

im getting a weird problem when refreshing my listview it works fine until the device is rotated and then when refreshing it again it goes completely blank. can only be fixed by rotating the device again (as it is also refreshed in onCreate()) but then whenever its refreshed again it goes blank. problem persists until app is restarted. ...

Android Click on listItem checks wrong checkbox

Hello, I've created a custom ListView by extending SimpleCursorAdapter. The result is IMAGE + CheckedTextView (Text + Checkbox). When I long click an Item, everything works fine - I get the right ID and details of the clicked Item. The problem occurs when I try to mark an Item as checked but it checks the wrong checkbox. For example:...

What is wrong with this code?

Sorry that I'm asking such a question, but I'm tryin to make this one run for hours, and I'm not finding the mistake... public class Main extends ListActivity { /** Called when the activity is first created. */ ProgressDialog dialog; @Override public synchronized void onCreate(Bundle savedInstanceState) { super.onCreate(savedInsta...