2014-12-23 86 views

回答

3

您可以更改ImageCardView的文本顏色如下:

// I'm assuming you're creating your ImageCardView within a Presenter 
@Override 
public ViewHolder onCreateViewHolder(ViewGroup viewGroup) { 
    final Context context = viewGroup.getContext(); 
    final ImageCardView imageCardView = new ImageCardView(context); 
    imageCardView.setFocusable(true); 
    imageCardView.setFocusableInTouchMode(true); 
    ((TextView) imageCardView.findViewById(R.id.title_text)).setTextColor(TITLE_COLOR); // Title text 
    ((TextView) imageCardView.findViewById(R.id.content_text)).setTextColor(DESCRIPTION_COLOR); // Description text 
    return new ViewHolder(imageCardView); 
} 
0

你能爲你是什麼定製ImageCardView想用 CustomImageCardView擴展BaseCardView