setBackgroundColor() 只接受整数.我真的不知道什么 int 等于什么颜色.有没有一种简单的方法可以在运行时将像 #2222FF 这样的字符串转换为 int?
setBackgroundColor() only takes ints. I don't really know what int equals to what color.
Is there a simple way to convert a string like #2222FF on runtime into an int?
int color = Color.parseColor("#2222FF");
这篇关于将运行时的android颜色字符串转换为int的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持html5模板网!
UIScrollView 不会滚动,即使在内容大小设置后UIScrollView will not scroll, even after content size set(UIScrollView 不会滚动,即使在内容大小设置后)
从右到左语言的 UIScrollView 方向 RTLUIScrollView Direction RTL for Right to Left Languages(从右到左语言的 UIScrollView 方向 RTL)
从 ScrollView Swift 中删除子视图Remove subviews from ScrollView Swift(从 ScrollView Swift 中删除子视图)
清除 UIScrollView 的内容Clear content of UIScrollView(清除 UIScrollView 的内容)
循环 UIScrollView 但继续减速Loop UIScrollView but continue decelerating(循环 UIScrollView 但继续减速)
Swift iOS以编程方式在导航栏下方设置滚动视图约Swift iOS Set scrollView constraint below navigation bar programmatically(Swift iOS以编程方式在导航栏下方设置滚动视图约束)