listview

Android Ellipsize marquee issues with currently selected list item

My Question - I want the text of a TextView I have in a custom ListView to marquee scroll ONLY when the item is selected in the ListView. When the list item loses focus, I want the marquee to stop scrolling. I know that I need to set the TextView to enabled (setEnabled(true)) for scrolling to work however when I do this as items are adde...

C# Winforms - Change a Listview item's label

Hello Again, I have looked through the listview controls and wasnt able to find how the label for each item is defined. When I load an image into the listview, I see the full path of the image under the image. What Im looking to do is replace the text with something more descriptive of the image itself, and not the path where it is loca...

Proper implementation of changing ListView data with CursorAdapter

I have a ListView populated via a CursorAdapter. I give my user the ability to alter the data in the list. For example, the user can mark a row as being unread (the data are messages). Suppose my user marked a row unread. Would a proper implementation mark the row in the database as read and then requery the Cursor? ...

Is it possible to re-arrange items in a list view?

On the iPhone a user is able to re-arrange the actual rows in a list. Is this possible on Android? If so, any examples would be great. ...

How can I create multiple context menus?

I have 1 activity, but would like to have multiple context menu's for different UI components. For example, I have a ListView which will react to: @Override public void onCreateContextMenu(ContextMenu menu, View v,ContextMenuInfo menuInfo) { super.onCreateContextMenu(menu, v, menuInfo); menu.setHeaderTitle("...

did anyone know why the prg shows no subitem ?

the listview shows in this test no subitem, the base is net cf 3.5 and wm6. and i become no error and no subitem but why Dim i As Integer For i = 0 To 3 Dim item As New ListViewItem piclist.Images.Add(getuserpic(Mainform.nickname_1.ToString, Mainform.mainurl)) item.ImageIndex = i item.Text = "tester...

[Android] Show default selection color for custom listview

Hello, I have a listview with a custom BaseAdapter. Each row of the listview has a TextView and a CheckBox. The problem is when I click (or touch) any row, the textview foreground becomes gray, instead of the default behavior (background -> green, textview foreground -> white). Here is the code: row.xml: <?xml version="1.0" encoding=...

Android ListView: Doesn't highlight on touch, but works when I use the trackball

I am using a couple of ListView elements in my app. In all cases, it doesn't highlight the selected item when I click/touch it, but I can use the trackball to scroll up and down, and can see the orange highlighted color then. How do I fix this? For e.g., one of them is a LinearLayout with two TextViews in it. ...

Android - Getting the relevant ListView row on CheckBox changed

Hi All, I currently have a ListView in my Android app that has a CheckBox on the side. When the checkbox is changed I want to get some info from the listview row that the button is in and then persist it, however, I can not work out how to get the row data from the onClickChanged listener. My listview is populated using a custom JSONO...

how to take the text in an array which come from a resource ?

this is a part of my code : public void onItemClick(AdapterView<?> parent, View v, int position, long id) { TextView title_t = new TextView(this); title_t.setText(""); String title = title_t.getText().toString(); switch(position){ case 0 : new AlertDialog.Builder(this).setTitle(title).setMessage("blah blah").setNeutralButt...

ListView with section header problem

Hi I'm adding section headers for my listView, there are few methods on the web. Since I'm using simpleCursorAdapter to manage my listView, I adopted phil bogle's method. http://thebogles.com/blog/2010/02/section-headers-for-android-listviews/ The error occurred at this part of the code: listAdapter.setViewBinder( new SimpleCursor...

Android Listview - first item is different

For some reason, the text has 0 width in the second row. Code: public LinearLayout getView(int position, View convertView, ViewGroup parent){ LinearLayout rowView; if(convertView==null){ rowView=(LinearLayout) mActivity.getLayoutInflater().inflate(R.layout.icon_list, null); }else{! rowView=(LinearLayout) c...

I've got two list but one itemclick method

the problem is that i have two listView but one itemClick method, if i put a switch, the position on one list is the same than the other list... And by example if i want to open a popup on an item in one list, the item in the same position in the other list gonna do the same thing, and i really don't want, can you help me? Thanks there ...

Scrolling through ListView with some images very laggy

I've got the below screen that contains some images (6 per visible page). Scrolling up and down seems quite laggy to me. It's like it's rendering the images again. Scrolling back up seems worse than scrolling down. Anyone know how to increase performance in such an area to create a nice smooth scroll? Update: The images and text is all...

try to do a public method

i want to create a method to open a popup when i click on it and the title and the text would be automatic, something like this : public void Display(String test){ new AlertDialog.Builder(this).setTitle(getTitle()).setMessage(test).setNeutralButton("close", new DialogInterface.OnClickListener() { @Override ...

Android: Problem With ListViews and CheckBoxes

I have a ListView, and within each list item I have some TextViews and a CheckBox. When I check a CheckBox and my onCheckedChangeListener fires, everything works as it should. However, random other checkboxes get checked once one is checked. Here is an example. If I click on the first CheckBox: 8 is checked. 15 is checked. 21 is checked...

Android Listview, cursor adapter with custom multiple select

I'm building a list of contacts, where the user can select more than one one contact. Currently the android layouts only provide a multiple select with a single textview and a checkbox, what I want to do is have the name and number and a checkbox (two textviews and a checkbox). When I implement this with a custom layout, and when the use...

ASP.NET ListView with DataPager throwing error after going to next page

Hi guys, I have a problem in ListView with DataPager. I have SqlDataSource <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ADSConnectionString %>" SelectCommand="usp_posts_getall" SelectCommandType="StoredProcedure"> </asp:SqlDataSource> and it was binded in ListView. I set my ...

How to get Id of a DataItem in ListView after DataBound

Hi, i am new in ListView Control. I have a List view to show shopping products. in each data Item i put a link-button for "Add to cart" button. in my scenario clicking on this button causes ShoppingCart.Instance.AddItem("Product GUID") to call. how can i perform that? i set CommandName="Select" in Link Button and performed this: protect...

ListView EditItemTemplate doesn't update as promised

I'm trying to use ListView's EditItemTemplate to bind controls in a page. It displays but #Bind fails to update the controls. If anyone sees any problems in my code (below), please let me know. <asp:LinqDataSource ID="srcProfile" ContextTypeName="[Data Context]" TableName="[Table Name]" Where="UserID = guid(@UserID)" EnableUpdate="True"...