Questions tagged [listview]

A ListView is a graphical screen control or widget provided by UI libraries in a majority of modern operating systems to show items in a list form.

Although there are many types of ListView controls across platforms and operating-systems, generally it is considered to be a type of enhanced list control with support for features such as columns (and column headers) and per-item images.

The ListView control is used extensively in the Windows UI shell, providing the display surface for the Explorer's folder view, for example. The control itself is provided by the Common Controls library and can be used by any application to display data.

ListView controls are sometimes also called in some platforms. In others, such as GTK+ they are implemented as a kind of columnar TreeView.

Tag Usage:

51186 questions
3007
votes
53 answers

How to stop EditText from gaining focus at Activity startup in Android

I have an Activity in Android, with two elements: EditText ListView When my Activity starts, the EditText immediately has input focus (flashing cursor). I don't want any control to have input focus at startup. I…
Mark
  • 37,835
  • 15
  • 37
  • 46
2001
votes
40 answers

How to lazy load images in ListView in Android

I am using a ListView to display some images and captions associated with those images. I am getting the images from the Internet. Is there a way to lazy load images so while the text displays, the UI is not blocked and images are displayed as they…
lostInTransit
  • 68,087
  • 58
  • 193
  • 270
455
votes
16 answers

How to implement Android Pull-to-Refresh

In Android applications such as Twitter (official app), when you encounter a ListView, you can pull it down (and it will bounce back when released) to refresh the content. I wonder what is the best way, in your opinion, to implement that? Some…
Randy Sugianto 'Yuku'
  • 64,635
  • 54
  • 168
  • 216
429
votes
11 answers

Background ListView becomes black when scrolling

I have created a specific List which exists out of the following elements to create a scrollable list with every row containing a Image on the left side and some text on the right side: To begin with a "root" layout :
TiGer
  • 5,789
  • 6
  • 31
  • 36
417
votes
12 answers

How do I remove lines between ListViews on Android?

I'm using two ListViews like this:
deepthi
  • 8,235
  • 12
  • 33
  • 35
362
votes
35 answers

How to implement endless list with RecyclerView?

I would like to change ListView to RecyclerView. I want to use the onScroll of the OnScrollListener in RecyclerView to determine if a user scrolled to the end of the list. How do I know if a user scrolls to the end of the list so that I can fetch…
357
votes
1 answer

List view getListItemXmlAttributes method fails with child publication items

I have created a JS class to populate SG/Folder list view data, when items are modified. (As per Jaime's approach) Everything works great when I operate on items in the publication they're created in. Ex: I open a component or page and the custom…
Warner Soditus
  • 4,133
  • 2
  • 12
  • 10
351
votes
6 answers

Android ListView with different layouts for each row

I am trying to determine the best way to have a single ListView that contains different layouts for each row. I know how to create a custom row + custom array adapter to support a custom row for the entire list view, but how can I implement many…
w.donahue
  • 10,575
  • 12
  • 54
  • 77
335
votes
7 answers

How do you dynamically add elements to a ListView on Android?

Can anyone explain or suggest a tutorial to dynamically create a ListView in android? Here are my requirements: I should be able to dynamically add new elements by pressing a button. Should be simple enough to understand (possibly without any…
user555217
  • 3,367
  • 3
  • 13
  • 3
323
votes
1 answer

ListBox vs. ListView - how to choose for data binding

I'm considering either a ListBox or a ListView for a WPF application. It seems either supports data binding and item templates. My application has a simple list of items that I intend to be able to search/sort/filter based on user input. The data…
Geoff Cox
  • 6,004
  • 2
  • 25
  • 30
316
votes
16 answers

RecyclerView vs. ListView

From android developer (Creating Lists and Cards): The RecyclerView widget is a more advanced and flexible version of ListView. Okay, it sounds cool, but when I saw this example picture, I got really confused about the difference between these…
Blaze Tama
  • 10,129
  • 11
  • 62
  • 119
296
votes
9 answers

Listview Scroll to the end of the list after updating the list

I would like to make sure that the list is scrolled all the way to the bottom, after I have updated the listview by using listAdapter, so that it displays the last element entered in the list. How can I do this ? I tried this but no…
jramirez
  • 7,963
  • 6
  • 29
  • 45
285
votes
14 answers

How to show an empty view with a RecyclerView?

I am used to put an special view inside the layout file as described in the ListActivity documentation to be displayed when there is no data. This view has the id "android:id/empty".
JJD
  • 44,755
  • 49
  • 183
  • 309
246
votes
24 answers

OnItemCLickListener not working in listview

Activity class code: conversationList = (ListView)findViewById(android.R.id.list); ConversationArrayAdapter conversationArrayAdapter=new ConversationArrayAdapter(this, R.layout.conversation_list_item_format_left,…
hiei
  • 2,875
  • 2
  • 15
  • 13
242
votes
2 answers

How to Get a Layout Inflater Given a Context?

I am writing a custom implementation of a ListAdapter. In its constructor, I'm taking in a Context, a resource ID (i.e. R.id.xxx representing the layout file), and a list and a map (these contain the data). Now, the problem is that i will need a…
Edwin Lee
  • 3,410
  • 6
  • 25
  • 35
1
2 3
99 100