listview

[Android] Returning to a ListView with a text filter

I enabled text filtering on my ListView in the expected way; adding android:textFilterEnabled=”true” in resource definition and (as I'm using a SimpleCursorAdapter) setting a FilterQueryProvider that provides a filtered cursor like so: public Cursor runQuery(CharSequence constraint) { Cursor cur = mDba.fetchTrackers(mCurrentGroupId,...

In Android, how would you develop this? (activity and views question)

When the user opens the application, there is a screen with a button on it, which says "login." The user clicks on the button, and a webview pops up to allow him to log in to the website. After logging in (the app would need to know somehow), the webview would disappear, and then a list of usernames will pop up. (ListView?) When the u...

Question: how to implement android double tap?

hi guys im having problems with implementing the double tap. Well i implemented the ongestureListener and i had the gesturedetector, but im not sure wheres the problem here is my code: public class home extends TabActivity implements OnGestureListener { /** Called when the activity is first created. */ private EditText queryText;...

Changing background color of ListView items on Android

How can I change background color of ListView items on a pair-item basis. When I use android:backgroundColor in the ListView item layout I can achieve this, however the list selector is no longer visible. I can make the selector visible again by setting drawSelectorOnTop to true but then the selector overlays the whole item. Any ideas h...

How to fetch all the rows in a listview wpf

Hi, I have a list view which has a grid view with four columns. The itemsSource for the listview is an IList(Of SomeType). Each cell in the grid contains a checkboxes, which are checked/unchecked based on the values in the bound property. Now i want to retrieve all the rows in list/grid view for saving purposes or atleast all those check...

WPF Listview binding to ItemSource?

Hi, I have the following listview, but it doesn't show the actual records, but only the namespace of the object. I wondered if I need to create the columns in XAML for it to show the records and then bind it to some properties of an object or what is wrong with this? <ListView Name="ListCustomers" ItemsSource="...

Wpf Combobox Binding in ListView

Hi i´ve got a problem with the databinding of a combobox in a listview. i have two classes: - Transaction - Substrate the Transaction has a attribute of the Substrate and the Transactiona are saved in a Datebase. At the start of the programm i want to load all Transactions as a list and show them in a ListView. Each possibility of Subst...

WPF ListView.Items.SortDescriptions Error

Hi, I am using the WPF SortDescriptions sorting technique and I have found that it will not sort numbers. When given a column of numbers to sort it tells me that "Failed to Compare two elements in the array" Does anyone know how to get around this? Or maybe give me some hints? I noticed that it will only sort strings right, but not nu...

WPF: ListBox - setting focus on an item breaks keyboard navigation

After selecting ListBox item programmatically it is needed to press down\up key two times to move the selection. Any suggestions? View: <ListBox Name="lbActions" Canvas.Left="10" Canvas.Top="10" Width="260" Height="180"> <ListBoxItem Name="Open" IsSelected="true" Content="Open"></ListBoxItem> <ListBoxItem...

.NET ListView column order problem

I have a problem in a form, where I've added columns to a .NET ListView control, in the following order: A | B | C | D The display index for columns A-D is 0-3, in that order, yet they display in the wrong order: A | B | D | C ^-----^ these are switched at runtime Note: Everything looks as I want it at desi...

Handling item checked in a TListView descendant.

I have a TListView descendant which introduces additional features like sorting and loading from a dataset. I now wish to modify the class so that whenever an item is checked or unchecked it is added or removed in an internal list of checked items so that an application using an instance of the component can easily read the number and l...

How do I fill a ListView (in Android) with XML or JSON data?

I read a tutorial, and it uses SQLlite and "SimpleCursorAdapter" to fill the list with items. This is the code the tutorial taught me. private void fillData() { // Get all of the notes from the database and create the item list Cursor c = mDbHelper.fetchAllNotes(); startManagingCursor(c); String[] from = new...

WPF: GridView with an "index" column

I have a standard ListView with a GridView. Now I want one of the columns in the GridView to be the 1-based index of that line in the list, as such: | # | First name | Last name | | 1 | John | Smith | | 2 | Anne | Anderson | How do I do that? ...

Android ListView - Making the parent expand to show all children when addingListViews within ListViews

Basically, I have a custom ListView in which each item looks like: <LinearLayout> <Table> <Row> <TextView/> <Button /> </Row> </Table> <ListView /> </LinearLayout> The ListView in each item is GONE by default and is set to VISIBLE when the button is clicked. Everything seems to work fine with the exception that when the ListView is...

How do I display 2 views in 1 activity (android)?

Suppose I have a webview open: public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); main_webv = (WebView) findViewById(R.id.mainwebview); main_webv.setWebViewClient(new HelloWebViewClient()); main_webv.getSettings().setJavaScriptEnabled(true); main...

How to do a WebView AND ListView in the same Activity onCreate()?

public class hello extends Activity, ListActivity { WebView main_webv; ListView main_listv; public static final int REFRESHLIST_ID = Menu.FIRST; private Handler mHandler = new Handler(); private static final String SPLASH = "http://"; private static final String LIST_NAMES = "http://"; private class HelloW...

How can I implement a ListView without ListActivity? (use only Activity)

I'm new to Android, and I really need to do it this way (I've considered doing it in another Activity), but can anyone show me a simple code (just the onCreate method) that can do Listview without ListActivity? THanks ...

Saving listview image setting

Hi, I want to save setting in the listView which contain images. How am i going to do this? From: Rayshiro ...

android's ListView does not listen on single clicks

Hi! I'm developing an simple application on Android, where some items are shown on a list. The user may click on one, taking him to a further activity. Basics... But my OnItemClickListener does not get called! I've found this very similar question, but the solution (disallow the list item view to get focus) does not work for me. Howeve...

How do I populate a listview based on 2 boolean table columns?

Hi, I have a database table containing scripts for plays/dramas. The scripts can be categorized under 'Theatre and Education', 'Plays for Young People' or both (by using bools to determine whether they belong to said categories); scriptID: int theatreAndEducation:bit playsForYoungPeople: bit scriptTitle: varchar scriptSample:text t...