views:

110

answers:

2

Hi,

I am trying to implement image as checkbox.

I have a list with 2 columns and I want to display checbox image on right side, as a third column.On clicking that image ,the image will be changed to a different one.

In which way I can do this?

Please help. ......

+1  A: 

One way to do this would be to create a custom Field that extends BitmapField. This custom field could contain two Bitmap images (one for each state). You might even consider having four images, so that you can indicate when it has focus as well. For example: unchecked-non-focused, unchecked-focused, checked-non-focused, checked-focused.

When you want to change the image (i.e. on a touch event or trackball click) just have your custom Field call setBitmap() with the appropriate bitmap.

Marc Novakowski
A: 

I want list in following format:

It would be great if someone provides me with sample code:

HEADER 1 HEADER 2

ITEM 1 ITEM 2 IMAGE(CHKBOX)

ITEM N ITEM M IMAGE(CHKBOX)

imMobile
You should get in the habit of editing your original question as this kind of information might get lost in a sea of answers.
Fostah
itsteju, just edit your question to add what you want and delete this yours "answer".
Max Gontar