android - Change color of content in listview -


i asking question in context previous question

i have following piece of code:

callsoap cs=new callsoap();               lst=cs.getmessage(id);             lstnew=cs.getnewmessage(id);              int numofmessages=lst.length-lstnew.length;                arrayadapter<string> adpt = new arrayadapter<string>(messages.this, android.r.layout.simple_list_item_1,lst);             lm.setadapter(adpt);              (int i=0;i<numofmessages;i++)             {                 lm.             } 

i number of new messages in variable : numofmessages

lm listview.

listview lm=(listview)findviewbyid(r.id.listview1); 

suppose numofmessages=3 , want make color of text of first 3 elements of listview (lm) red.

please me how can in loop, in such case.

try impliment additional column of unique id or time of last fetch , next time compare database new fetch ids or time , according display color in row..


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -