views:

122

answers:

2

i have created an application that contains a list field(custom)

i want if a certain condition is satisfied then rowheight should be 100 else it should be 50

how can i do that

i tried setRowHeight(index,size); but it dnt worked.Moreover its undocumented toooooooooo..

any help will be appreciated

A: 

hey i got the answer

i did some manipulations in the drawListRow method of the custom list field and i could make a list field with variable row size

if(mycondition==true)
   setRowHeight(50);
else
   setRowHeight(100);

also in drawrow method i wrote

layout(width, 100);

and it worked for me....

but i m still testing it to check whether it works on all devices and in all conditions and may be some body else help me to make it better!!!!!

SWATI
hey i got 1 errorit works only for first row!!!!!but this can be solved!!!!!!!!!!!let me have a try
SWATI
A: 

i got illegalStateException while usiong layout(width, 100);

Rohan