1

Hi I am new to blackberry i am working on listview . Here i want a custom list item layout.

In my list view i ll have a user image on left nd on right layout part i ll have following things

1st row title (Text field) 2nd row text field with image right to it . 3rd row is a text-field

and to right of this layout i ll have a image (right arrow)

[left-part of list item image][middle part with 3 rows ][ last part with image]

like the above please help me

tonymontana
  • 5,728
  • 4
  • 34
  • 53
sudheer
  • 184
  • 1
  • 10

1 Answers1

2

I think you can do this by creating component of row. Your row should be like this.

enter image description here

First of all there must be a HorizontalFieldManager that is our row. And you shuld create BitmapFields and LabelFields with overrided getPreferredWidth() and getPreferredHeight(). In these methods remove super.getPreferredWidth() and super.getPreferredHeight() and put your fixed height and width.

  • Add one of your CustomBitmapField to HFM
  • Create one VerticalFieldManager and add 3 of your CustomLabelFields after that add VFM to HFM
  • Add second CustomBitmapField to HFM

    Now your row is ready. You can create custom list field by adding these rows to your screen or a VerticalFieldManager

  • Ahmet Gulden
    • 2,063
    • 2
    • 15
    • 23
    • I need this layout as a list item . how to do that.Thanks for the response – sudheer Mar 13 '12 at 13:40
    • Just as i explained. You need to create CustomHorizontalFieldManager. This is your list item. Then create other custom parts and put all of them in it. – Ahmet Gulden Mar 13 '12 at 15:34
    • 1
      Check this answer carefully, http://stackoverflow.com/a/1881319/431639, it does the same thing what @AhmetGulden have suggested. Play with the class `TableRowManager`, `TaskListField()`. Also you need to set the row height of the individual ListField row with `setRowHeight(height)`. – Rupak Mar 14 '12 at 06:06