Questions tagged [simpleadapter]

SimpleAdapter is a basic Android adapter which can be used to map static data to views in a xml layout.

A SimpleAdapter expects that the data supplied to be in the form of a List of Maps, where each Map represents the data for one row. The SimpleAdapter is a limited adapter by default, it will only bind data to an ImageView or TextView, for any other views the user must either use a ViewBinder or override the adapter's default behavior. More can be found in the documentation of the SimpleAdapter.

334 questions
4
votes
4 answers

how to hide a textview in SimpleAdapter

am using a simple adapter to show set of strings in different text fields in a listview... i want when i click a particular content in that listview, some textview should be invisible.. how to do that... my code is String[] from = new String[]…
786
  • 71
  • 1
  • 2
  • 4
3
votes
2 answers

Android: Dealing HashMap.put for image

I want to add an image to the listview, how do i do so? The names and type are displaying properly. Currently stuck here. .//other codes . . try{ JSONArray arr = new JSONArray(res); for(int i=0;i
DroidMatt
  • 183
  • 1
  • 3
  • 20
3
votes
3 answers

Custom SimpleAdapter only shows Sample Text Android

Before making my own SimpleAdapter object because I wanted to change the color of the rows, I was just using new SimpleAdapter(...). Now that I am using my own custom SimpleAdapter, the row color is changing, but my text is not getting updated. I…
Kgrover
  • 2,113
  • 2
  • 35
  • 54
3
votes
2 answers

Android: About ListView and SimpleAdapter

I've tried to using a SimpleAdapter to fill a ListView but only to failed. I've read many cases but still can't find a useful method. Here is the Code. I wonder what's the problem. ArrayList> listdata=new…
Yuhao_Zhu
  • 161
  • 2
  • 12
3
votes
3 answers

Displaying bitmap image in imageview by simple adapter

I am getting image from an url. I am using imageview in listview. I want to add the list of bitmap images into the each row of the list item. I used SimpleAdapter but the imageview shows blank.My code is below !! ArrayList>…
Santhosh_pulliman
  • 2,059
  • 6
  • 30
  • 46
3
votes
3 answers

How can remove adapter from Listview, Android

I use SimpleAdapter with custom row layout for Listview SimpleAdapter adapter = new SimpleAdapter(ListOrder.this, oslist, R.layout.list_v, new String[] { "name","time","status" }, new…
3
votes
2 answers

How to make an ImageView visible and invisible on clicking a ListView row in android?

I have a ListView which is generated using a SimpleAdapter.I have a textview and an ImageView in the xml file which is used with the SimpleAdapter. The imageview is set to invisible at first. When a row in the Listview is clicked the Imageview…
user3509091
3
votes
0 answers

Fill a ListView using SimpleAdapter with Maps vs SimpleCursorAdapter with MatrixCursor

My Android application uses a ListView with simple two-line rows. The list is filled in using simple static data. I am aware of two different solutions for filling in the list in these circumstances: 1) Using a SimpleAdapter with an ArrayList of…
3
votes
1 answer

How to get ListView position and corresponding SimpleAdapter data of the row where checkbox was clicked?

I have a ListView which shows users names.The ListView get this data from the SimpleAdapter.Each row in this ListView has a TextView which shows users names and a ComboBox which is used for selecting corresponding name.The problem I don't know how…
MainstreamDeveloper00
  • 8,056
  • 13
  • 52
  • 100
3
votes
1 answer

Displaying image in a ListView with a SimpleAdapter using Hash Map - Android

I'm using a SimpleAdapter to display a ListView in a Hash map of JSON parsed data. Everything works perfectly. How do I effectively add an image in this ListView (or add an image to the Map) ? Adding image to the hash map does not display the image…
Vijay
  • 145
  • 2
  • 8
3
votes
1 answer

load image from the URL and add it to the listview

Now i am working with an android project here I've a list view that list view getting some results from the Google API by JSON class. Now i am trying to get some images through the TAG_ICON variable which returns a URL and i directly given the URL…
3
votes
1 answer

Can't set the rating bar in Simple Adapter in android

In my android project there is a list to show some list from the Google places API here the Google API returns the rating as a string value i want to add it to the Simple Adapter to show rating bars in the list please help me to fix this…
Hybrid Developer
  • 2,239
  • 28
  • 49
3
votes
0 answers

Android; Using SimpleAdapter with setOnItemClick a Listview containing Checkboxes

I have a ListView in an Activity (Not ListActivity) that is populated by a SimpleAdapter. public void updateGroupsInfoPane(){ final ListView m_listview3 = (ListView) findViewById(R.id.memberOfList); mapMemberOfList.clear(); for (String…
3
votes
1 answer

How to use SimpleAdapter.ViewBinder?

I have a list with a complex layout R.layout.menu_row. It consists of a ProgressBar and a text field. The adapter I use: SimpleAdapter simpleAdapter = new SimpleAdapter(this, getData(path), R.layout.menu_row, new String[] { "title",…
2
votes
2 answers

Problems on setting ListView's item background color

I've a ListView and when the user clicks on one of its items I want that item to become blue. In order to do this, in the onCreate() method of the ListView activity, I've set a listener for the user clicks.…
Ant4res
  • 1,187
  • 1
  • 15
  • 34
1
2
3
22 23