简体   繁体   English

为什么不能设置随机颜色?

[英]Why can't set the random color?

Description 描述

Tool: Android 4.2+, Jelly Bean, API level 17 工具: Android 4.2+,Jelly Bean,API等级17

I started android programming a couple of hours ago and I can set a random text, but the color don't changing (text and background, too). 几个小时前我开始进行android编程,我可以设置一个随机文本,但颜色不会改变(文本和背景也是如此)。 I use the same logic, what was right at the text modifying, but something went wrong. 我使用相同的逻辑,正确的文本修改,但出了点问题。

Activity content 活动内容

活动内容

ColorWheel content ColorWheel内容

ColorWheel内容

Okay, I tested on an AVD device, and it's working! 好的,我在AVD设备上进行了测试,它正在运行! I don't understand this.... my phone will be crash or stupid?? 我不明白这....我的手机会崩溃或愚蠢? (I really care the correct API level, so I don't know what's the problem..) (我真的关心正确的API级别,所以我不知道问题是什么..)

But the point is the code is right. 但关键是代码是对的。 Thanks for helping! 谢谢你的帮助!

PS: next time i will use the code, not the picture. PS:下次我会使用代码,而不是图片。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM