I have spent some days trying to solve a problem I have with ListViews on Android. I would like to implement a single selection list box using a ListView. So, I would like t
@Override
public View getView(int position, View convertView, ViewGroup parent)
{
LayoutInflater inflater=(LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
View itemView = inflater.inflate(R.layout.verselayout, parent, false);
txttitle = (TextView) itemView.findViewById(R.id.Versetxt);
if (position%2 == 0) {
txttitle.setTextColor(Color.parseColor("#FFFFFF"));
}
else
{
txttitle.setTextColor(Color.parseColor("#FFFF00"));
}
return itemView;
}