I am trying to find a way to change the background of the Android Library like: 1.row darkgrey; 2. row grey; 3. row darkgrey; 4.row grey etc.
But it did not work.
I tried it with:
if(mIndexController%2 ==1){
itemContainer.setBackgroundColor(R.color.grey);
viewsContainer.setBackgroundColor(R.color.grey);
}
else{
itemContainer.setBackgroundColor(R.color.darkgrey);
viewsContainer.setBackgroundColor(R.color.darkgrey);
}
In the Library UITableView Activity, But its not working.
Could someone help me?
Here is the Library: https://github.com/thiagolocatelli/android-uitableview
I want the ListView to look like this: http://i.stack.imgur.com/Ls5bG.png
In fact viewsContainer.setBackgroundColor(R.color.grey);
does nothing.
You should correct it like this:
viewsContainer.setBackgroundColor(getResources().getColor(R.color.grey));
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With