I am developing a week data application in Android. I would like to set the background color for weekday (example: friday). I am using the listview in xml. Thanks a lot for your suggestions,
private void addDateView(LinearLayout layout, String text,
boolean isCurrentDay) {
listview child = new listview(layout.getContext());
if (isCurrentDay) {
child.setBackgroundColor(Color.rgb(242, 199, 125));
} else {
child.setBackgroundColor(Color.WHITE);
}
child.setGravity(Gravity.CENTER);
child.setTextColor(Color.RED);
[enter image description here][1]child.setPadding(8, 8, 8, 8);
layout.addView(child, (SCREEN_WIDTH / 7), 50);
}