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.

335 questions
-1
votes
2 answers

Android Async Execution comes after onCreate

I'm really new to android application creation and I'm using Android studio to work on my project. I'm fetching json result from my db and the fetched result are what I want, but I do not know how to let asynctask to finish before onCreate. My…
-1
votes
1 answer

Casting issue while filtering using adapter, How to fix it?

An exception occured during performFiltering()! java.lang.ClassCastException: android.graphics.Bitmap cannot be cast to java.lang.String my code is this adapter = new SimpleAdapter( getActivity(), contactList, …
Mayank Kushwaha
  • 342
  • 1
  • 8
-1
votes
2 answers

Why do I have java.lang.NullPointerException at multiple libraries in Android in trying to Parse JSON

I am trying to parse a JSON format in my Android Application. I am fairly new in developing android applications so I am referring to a lot of tutorials. I followed the steps in this tutorial :…
-1
votes
1 answer

load image using picaso into hashmap and display using simpleadapter

i want to load image using picaso into hashmap and display using simpleadapter in uicircular imageview. As this list is displaying text + circularImages. And data is comming in json format. I want to know how to do this.
Gaurav
  • 1
  • 1
  • 6
-1
votes
3 answers

The simpleAdapter shows an error in the constructor

I am with a problem in my code . I tried many things in this code , However it does not fix . In the end the error is described. It is something related with constructor. SelectActivityAnswer.java package com.example.test; import…
YVLM
  • 53
  • 1
  • 2
  • 5
-1
votes
3 answers

Deleting item from ListView deletes some another item from SQLite database

If I delete an item from listView suppose item_no = 5, then some another item gets deleted from database whose id is not 5. Here is my code. My database class TRDBHelper.class //Get single reminder Cursor getReminder(int id){ SQLiteDatabase db…
Apurva
  • 7,871
  • 7
  • 40
  • 59
-1
votes
1 answer

Can't wirte getView in my SimpleAdapter in Fragment

I have a fragment with a AsyncTask in which I do a parsing Json. To put every element in a list I use a SimpleAdapter. In my item list I have a button. Of course, if I want click on the button I need to create a getView. Well not works. This is the…
Atlas91
  • 5,754
  • 17
  • 69
  • 141
-1
votes
2 answers

Getting row data from database and retrieving it in Android

I am working on a project that has many tables and a table contains multiple rows. How can I get data from database and show it using a SimpleAdapter? I have tried using a cursor but I am only getting the last row value stored in the database. When…
-1
votes
1 answer

SimpleAdapter with layout and SQLite crashing on startup Android

Im trying to make an app in android with an list! well im getting the data i want from my database and now im trying to put in in an listview i tried following an tutorial and that worked. now im building an app for myself and my app crashes on…
Twizzler
  • 491
  • 1
  • 7
  • 25
-1
votes
2 answers

how to display multiple list objects using simplelist adapter in android

this is not working i would like to append the second SimpleAdapter over the 1st SimpleAdapter. but , it is getting overwritted and only the second list is being displayed. I want to display both in a single list with different list format for each…
-1
votes
1 answer

ArrayList> get values

Help getting values from ArrayList data = new ArrayList>(); for (int i = 0; i < marks.length; i++) { HashMap m = new HashMap(); m.put("title", marks[i].getUserName()); m.put("mark",…
-1
votes
2 answers

Using Custom Font on simple adapter getting error, What is the error?

I'm new in android... I want to have custom font in my android project, so I put my code base on this tutorials. I want to use my custom font in R.id.Headline and some xml element My question is: -Is there something wrong in my code? -Is there any…
Netra
  • 73
  • 5
  • 13
-2
votes
2 answers

Android: simple adapter null pointer

I have an app that I want to retrieve data from my server with PHP Json and get method , I use simple adapter and Json downloader and json parser for this app , I have problem with my simple adapter to show my data in my listView , When I run my…
-2
votes
2 answers

How to bold a section of a string in Java on an Android ListView?

I am passing the string via an ArrayList Hashmap. My code is as follows; Adapter1 = new SimpleAdapter(getBaseContext(), myList, R.layout.content, new String[]{ "TA", "IA"}, new int[]{R.id.ta, R.id.ia}); …
Zac
  • 695
  • 1
  • 11
  • 34
-2
votes
1 answer

Did I connect my Listview to simpleadapter?

Can someone fix it? Can someone tells me that why the compiler doesn't allow me to do that? I watch this from online tutorial.
Jinyu Wu
  • 85
  • 1
  • 11
1 2 3
22
23