I am asking question in context with my 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);
for (int i=0;i<numOfMessages;i++)
{
lm.
}
I get number of new messages in variable : numOfMessages
lm is my listview
.
ListView lm=(ListView)findViewById(R.id.listView1);
Suppose numOfMessages=3
, then i just want to make the color of text of first 3 elements of my listview (lm) as red.
Please help me how can i do that in this loop, in such a case.