I've a ListView where every element in the list contains a TextView and two different Buttons. Something like this:
ListView
--------------------
[Text]
[Button 1][Button 2]
--------------------
[Text]
[Button 1][Button 2]
--------------------
... (and so on) ...
With this code I can create an OnItemClickListener for the whole item:
...
I have this method:
private void listView1_DoubleClick(object sender, EventArgs e)
{
if (listView1.SelectedItems.Count > 0)
{
ListViewItem selectedFile = listView1.SelectedItems[0];
label7.Text = selectedFile.ToString();
string selectedFileLocation = selectedFile.Tag.To...
Pretty straight forward question, but I can't find a way to do it.
When a user double clicks an item in my ListView I want to save the index number of the clicked item.
...
I can't seem to make this work using this:
private void listView1_DragEnter(object sender, DragEventArgs e)
{
if (e.Data.GetDataPresent(DataFormats.FileDrop))
{
e.Effect = DragDropEffects.Copy;
}
}
private void listView1_DragDrop(object sender, DragEventArgs e)
{
string[] dire...
I'm attempting to use a ContextMenu.
I've successfully done this for a simple ListActivity using SimpleCursorAdapter.
Moving on I want to replace SimpleCursorAdapter with CursorAdapter but still retain the ContextMenu behaviour, so I've added the two mandatory override functions bindView and newView
public View newView(Context context, ...
I'm displaying data in a ListView. The data (gotten through a DLL and set in an ObservableCollection) is updated every 3 seconds using a TimerCallback. I'm using data-binding between my ListView and the data.
I'm adding right-click menu for the list view items. It seems like when the data gets updated, my listview's SelectedIndex wil...
Hello guys
I coded an own Adapter and added it to my ListActivity via an ListView.
The reason why I wrote an own Adapter is, that i had to make some layout changes to the list-entrys. In every entry of the list i've got 3 TextViews.
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/...
Is it at all possible within a ListView ItemDataBound event handler to gain access to the full DataRow for that event? I need to do a lot of processing for the entire row on binding, but using data item values in the datarow that I am not actually using in the display itself.
Cheers
Moo
...
I wanted to make the listview show thumbnails only when the items are visible on the screen.
Is there a way to do this?
...
I want a nice looking filter for my ListView in Android.
How can I do this?
...
Hi there, I have a ListView with an adapter extending BaseAdapter. I create a view (from a LinearLayout and I put some items ont it depending on some parameters. I have a textview, with a drawable and sometime another textview next to the drawable in this horizontal linearlayout. For some reason, this command doesn't seems to work.
set...
I am nesting 3 listviews.
I use the itemdatabound event to find my second listview to bind to.
My question is how do I find the third listview. How do I access the itemdatabound of the second listview to then find the third control.
Hope that makes sense
Thanks
EDIT: Can someone point me to a good example or tutorial on how to do th...
In Vista and Windows 7 almost any time the system uses a standard Listview (ie: Explorer Windows) it's accompanied by a little split button that shows a slider when the split is clicked that allows you to switch between the different views available for that listview (Tile, Details, List, etc.) as well as sliding smoothly between icon si...
I've adopted the following pattern for putting ListViewItems in a ListView with multiple columns (when I want to display information about a list of MyObject types), and I'm just curious to see if this is the best way to accomplish this task, or if there's anything more efficient and readable in code:
Create an inherited ListViewItem c...
Hello there,
I'm ownerdrawing .Net Windows Forms ListView control and see a very strange bug/behavior when I need to draw an image from the associated LargeImageList.
When the View type is a type where LargeImageList is used (Tile, LargeIcon, etc.), I draw item images from the LargeImageList. At that condition, I see a huge memory incr...
I know there has to be an easy way to do this, I just can't think of it. I need to display a set of notes in a WPF application. The layout for each note would be
Note Name Note Date
Note Text
Each item above exists individually in my database access layer and I just need a way to display it. In ASP, this is something I might have cre...
I have a single ListView with a DataPager that loads datasource 'A' within an UpdatePanel. Datasource 'A" is loaded on Page_Load.
if (!IsPostBack)
{
GetBookmarks(0);
}
An OnClick event outside the ListView can change the ListView datasource to 'B'; and toggle between 'A' and 'B'. However the DataPager continues to only use datasou...
Android empty list layout
Whatever I do, I can't get the empty tag to display. Inside my tabs, I've got:
<LinearLayout
android:id="@+id/thisParticularTab"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView android:id="@+id/LastUpdated"
android:layout_width="fill_parent"
a...
Firstly, I have found many examples of how to grab data from a db and place it into a list, however this seems to be all for ListActivites.
My list is part of the UI and therefore I can't use a ListActivity because it does not consume the whole screen (or can I?).
This is the UI:
<SlidingDrawer android:layout_width="wrap_content"
an...
Hi all,
I'm trying to do something after scrolling stopped.So, I tried using OnScrollListener#onScrollStateChanged(SCROLL_STATE_IDLE) to detect when the scrolling stopped(either TOUCH_SCROLL or FLING)(at 1.5 it's runs as i expect).
But when it runs on 2.0, onScrollStateChanged can't received the event after releasing the finger.Is ther...