Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
The moose likes Android and the fly likes Problem with ListView and QuickContactBadge Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Mobile » Android
Bookmark "Problem with ListView and QuickContactBadge" Watch "Problem with ListView and QuickContactBadge" New topic
Author

Problem with ListView and QuickContactBadge

Rakesh Jhamb
Ranch Hand

Joined: Jun 18, 2003
Posts: 154
I have a ListView which dynamically adds QuickContactBadge and a TextView to show contact names and their photo in QuickContactBadge. I am using the following code to show photo in QuickContactBadge...



Then i am calling this method by saying.
quickContactBadge.setImageBitmap(loadContactPhoto(getContentResolver(), contactId));

I have following problem

1) The image is getting displayed, but it is huge. how to control layout and size of quickcontactbadge. Sample code is appreciated.
2) Is this the best way to show image of a contact in quickContactBadge or if there is a preferred way, please let me know.

Thanks


SCJP2, SCWCD
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Problem with ListView and QuickContactBadge
 
Similar Threads
Getting an image from an emulator?
QuickContactBadge in ListView
getGraphics() null but paint() still works!
Retrieving image from database - getBlob?
problem in image File format