
我需要从TextVIEw获取当前文本颜色,然后将此值分配给TextVIEw.setTextcolor().但是我得到了一个大型的-1979711488138,我怎样才能得到它的颜色?最佳答案
Integer intcolor = -1979711488138;String hexcolor = "#" + Integer.toHexString(intcolor).substring(2);要么
String hexcolor = String.format("#%06X",(0xFFFFFF & intcolor)); 总结 以上是内存溢出为你收集整理的android – 使用getCurrentTextColor()设置setTextcolor全部内容,希望文章能够帮你解决android – 使用getCurrentTextColor()设置setTextcolor所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)