Color of chapterlist wasn't displayed correctly

This commit is contained in:
daniel oeh 2012-11-23 19:47:37 +01:00
parent 509423653d
commit 49974c776a
1 changed files with 4 additions and 1 deletions

View File

@ -30,6 +30,8 @@ public class ChapterListAdapter extends ArrayAdapter<Chapter> {
private List<Chapter> chapters;
private FeedMedia media;
private int defaultTextColor;
public ChapterListAdapter(Context context, int textViewResourceId,
List<Chapter> objects, FeedMedia media) {
@ -52,6 +54,7 @@ public class ChapterListAdapter extends ArrayAdapter<Chapter> {
convertView = inflater.inflate(R.layout.simplechapter_item, null);
holder.title = (TextView) convertView.findViewById(R.id.txtvTitle);
defaultTextColor = holder.title.getTextColors().getDefaultColor();
holder.start = (TextView) convertView.findViewById(R.id.txtvStart);
holder.link = (TextView) convertView.findViewById(R.id.txtvLink);
convertView.setTag(holder);
@ -126,7 +129,7 @@ public class ChapterListAdapter extends ArrayAdapter<Chapter> {
holder.title.setTextColor(convertView.getResources().getColor(
R.color.bright_blue));
} else {
holder.title.setTextColor(Color.parseColor("black"));
holder.title.setTextColor(defaultTextColor);
}
} else {
Log.w(TAG, "Could not find out what the current chapter is.");