Questions tagged [android-viewbinder]

The ViewBinder is an Android class that can be used with an adapter to modify(or enhance) the way that adapter binds its data to its views.

The Android ViewBinder is designed to work with various types of adapters(like SimpleAdapter, SimpleCursorAdpter etc). This class should be used to either enable the adapter to bind data to views it doesn't support or to modify the way the adapter currently binds its data. The proper usage of a ViewBinder is to implement its setViewValue() method and then register it with the adapter(through the adapter's setViewBinder() method).

94 questions
0
votes
1 answer

LoadManager, SimpleCursorAdapter, ViewBinder - no URI?

I am trying to implement LoaderManager since its taking a while to load the rows into my ListView. All of the examples I have found online keep referring to a CONTENT_URI - something which I don't have. Here's my old code for loading my ListView…
0
votes
1 answer

Android: ViewBinder & SimpleCursorAdapter SQL woes

I am struggling to get more complicated queries to work with SimpleCursorAdapter and ViewBinder with a ListView. When I was just returning all entries in my table, that was no problem. However, I want to return a list of artist names from my tables…
SparkyNZ
  • 6,266
  • 7
  • 39
  • 80
0
votes
1 answer

Show pictures from internal storage in existing SQLite ListView (ViewBinder)

I have an existing ListView from a SQLite database. I want that user can add pictures from their gallery to the listview. These pictures get saved in the internal storage as "*.jpg" where * is the specific row id if a new account gets…
Kroenig
  • 644
  • 7
  • 16
0
votes
1 answer

How convert String in Text without mistake?

I've got table with 2 Colums: GOAL(text) and FLAG(0 or 1) If value from FLAG = 1 text from GOAL get Strike. final TextView txt=null; scAdapter.setViewBinder(new SimpleCursorAdapter.ViewBinder() { public boolean setViewValue(View view, Cursor…
tadvas
  • 131
  • 1
  • 13
0
votes
1 answer

Add a SimpleCursorAdapter to a TextView

Is there a way to use a SimpleCursorAdapter via a CursorLoader so that I can keep a TextView up to date with my database changes? I have an account balance that I want to maintain without having to manage every change myself. My TextView isn't in…
0
votes
1 answer

Listview and CustomViewBinder

So i have a list of 7 days worth of information to display. When the list is populated the @+id/image shows correctly (as far as i can see) and when i scroll down and back up the image is changed. In the case where the image is populated with…
jcaruso
  • 2,364
  • 1
  • 31
  • 64
0
votes
1 answer

Better way to implement custom views in a listview with simpleadapter?

I have a value called tags which is a comma separated list of words. I want to put this into nicely designed "tag-buttons". The below works. However the line ((LinearLayout) view).removeAllViews(); seems like an ugly fix for not adding the tags…
jonaz
  • 3,764
  • 2
  • 20
  • 20
0
votes
1 answer

ViewBinder and disappearing Images

We've gotten it to show the images and hide them when needed but they are Disappearing when i scroll down or up. Anyone every seen this or know its cause? Not sure whats going on but when i scroll its as if it is redetermine if it needs to be…
jcaruso
  • 2,364
  • 1
  • 31
  • 64
0
votes
1 answer

Android viewBinder displaying images on simpleCursorAdapter

I have created a working ViewBinder to use with my simpleCursorAdapter, and all is functioning properly. The desired images display as they should,etc. But when I was testing my code, I put a log my in my viewbinder that displays the criteria for…
k.e.n.
  • 47
  • 8
0
votes
1 answer

SimpleCursorAdapter.ViewBinder text not showing

I have been stacked at a problem and i can not find the solution. I have a database and i load a listview using SimpleCursorAdapter. I want to change the color of a text depending on the value of a column in database ("incOrExp"). This is my list…
N.K.
  • 415
  • 3
  • 20
0
votes
1 answer

ListView setBackgroundResource not working android

I have problem wit changing backgroud color in my project. I'm just trying to change list background color with condition in ViewBinder. But color of backgroung didn't changing. My ViewBinder public boolean setViewValue(View view, Cursor cursor, int…
zajca
  • 2,288
  • 4
  • 30
  • 40
0
votes
0 answers

How to set Image source to a listView depending on database fill data

Basically what i'm trying to do is set dynamically a image source to a image view depending on the id that i get from a precreated database. this is my ListFragment: public class teamsListFragment extends ListFragment implements…
0
votes
2 answers

Populating listview with images - viewbinder or customcursoradapter? How to?

I'm trying to populate a listview with images, whose URI is returned from a cursor. I'm not sure if I should use a viewbinder with my simplecursoradapter, or to create a custom simplecursoradapter that somehow does the same job, and I also don't…
user1352742
0
votes
1 answer

ViewBinder creates random content

I have strange behavoir in a ViewBinder. All works good on TextViews. With CheckBoxes (removed in my code) and custom widgets progressChart the values are not stored in the right postion of the List when I scroll down and/or up again. All seems very…
user1324936
  • 2,187
  • 4
  • 36
  • 49
0
votes
1 answer

ProgressBar in ViewBinder hast strange values

I have a SimpleAdapter with a ViewBinder. The ViewBinder binds some TextViews and a ProgressBar. The TextView works fine but when I scroll the list back I get weird values for the ProgressBar. Why does this happens
user1324936
  • 2,187
  • 4
  • 36
  • 49