有人知道如何从Leanback ImageCardVIEw更改标题textcolor ???
我试图覆盖leanback风格,但也许我没有找到正确的属性.
非常感谢!!!
解决方法:
您可以更改ImageCardVIEw的文本颜色,如下所示:
// I'm assuming you're creating your ImageCardVIEw within a Presenter@OverrIDepublic 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);}
总结 以上是内存溢出为你收集整理的Android TV Leanback imagecardview文字颜色全部内容,希望文章能够帮你解决Android TV Leanback imagecardview文字颜色所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)