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
1
vote
1 answer

ViewBinder setViewValue only working sometimes

I'm using a SimpleCursorAdapter and I'm not sure why this is working only sometimes. If I redo the same query I get different bindings. It has nothing to do with what the cursor has though I know. All I am trying to do is set the TextView to null if…
John61590
  • 1,106
  • 1
  • 13
  • 29
1
vote
1 answer

Set ImageView on a ListView with ViewBinder depending on RatingBar value

I have in my MainActivity a ListView which shows a list of movies that i'm populating with a SimpleCursorAdapter. In another activity the user is able to set the rating with a RatingBar and the float value is saved in the Database. I would like to…
1
vote
1 answer

Adding tags to ListView's TextView?

I'm writing my church's Android app, and I'm trying to use a ListView as a launchpad to view sermons online. The LV populates correctly, but there are two TextViews in each list item that aren't populated by the cursor - they have the same text in…
1
vote
1 answer

Android Dev: Inserting a local image file into a ListView referenced from a SQLite database via a ViewBinder

So I have an application that users can take a picture and store it locally. The image name is stored in my SQLite database for future reference to call the photo. Right now I've traced the problem to setting the bitmap image to the imageview.…
Alex P
  • 33
  • 1
  • 4
1
vote
1 answer

Changing Color of ListView Row Item

This is the Alliances Activity on my app: This is the layout for a single row:
1
vote
3 answers

Removing an Imageview from View

I want to remove an imageview from a View (android.view.View)based on a codition.condition is the src of that image view.How can i remove an imageView from a view. please help
V I J E S H
  • 7,464
  • 10
  • 29
  • 37
1
vote
2 answers

Invisible text color instead of white in a listview displaying entries from database

Im trying to change text color in a listview, which is displaying my entries from database. The problem is that it displays invisible text ( or it displays nothing at all. only the lines which are separating my entries on this list) but after…
apony
  • 75
  • 8
1
vote
1 answer

Using SimpleCursorAdapter.ViewBinder to change color in a listView. android

I was trying to change color on a text in a ListView, so I created ViewBinder but my text is still white, nothing change, what can I do with it? // map each name to a TextView String[] from = new String[] { "event" }; int[] to = new int[] {…
1
vote
1 answer

CustomSimpleCursorAdapter vs ViewBinder?

I have a list of items which is fetched from the local database. Every item has property isNew. I want to make visible TextView with text "new" only for items which match isNew = true. I solve this problem with two ways, and now I want to know which…
1
vote
2 answers

CheckBox doesn't change state

I have a: public class MyList extends ListActivity { SimpleAdapter simpleAdapter; Binding to the ListView is done by a ViewBinder: simpleAdapter = new SimpleAdapter(this, getData(path), R.layout.menu_row, new String[] { …
user1324936
  • 2,187
  • 4
  • 36
  • 49
1
vote
2 answers

Displaying an icon in a database using ViewBinder

I have successfully created a table using SQlite in android. There is a column for sex( male/female) in the database. What I would like to do is to is to check the sex type and display a male/female icon depending on the type. I have used…
Nidhin_toms
  • 707
  • 4
  • 18
  • 29
0
votes
1 answer

Lifecycle of calls when using the SimpleCursorAdapter.setViewImage

OK, trying to get images from my SD card to show in an activity ListView. I'm reading lots of hints, but I'm missing an important chunk. I'd love to see a short-ish bit of source code that illustrates this, haven't found anything yet. From my…
0
votes
1 answer

SQLite BLOB column to SimpleCursorAdapter with ViewBinder

I'm trying to display a list of contacts that are currently stored in a SQLiteDatabase. Previously I've retrieved ContactsContract.Contacts.PHOTO_THUMBNAIL_URI and stored it in a form of byte[] in the BLOB column of my database rows. Now when I'm…
0
votes
1 answer

How can I find a specific record in a ListView?

Let's say that I have a Cursor that has 50 records in it and it is bound to a ListView using a ViewBinder. I'd like to find a specific row(example: _id 35) and make sure that record is visible to the user on the android device. Is this possible?
0
votes
1 answer

ImageButton in ViewBinder doesn't work

I created a ViewBinder, to hold my items in a ListView, which get its contents from a SimpleCursorAdapter and in this there's a ImageButton. I successfully get the list but the ImageButton just won't respond to my onclick event to bring a string…
oratis
  • 818
  • 1
  • 9
  • 29