Anybody knows how can i change title textcolor from Leanback ImageCardView ???
I have tried to override leanback style but maybe I haven't found the correct attribute.
Thank you so much!!!
You can change the text colour of the ImageCardView as following:
// 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);
}
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