【发布时间】:2016-04-02 16:10:49
【问题描述】:
在 mainActivity 中,我使用 hexString 然后开始新的活动并将 hexString 发送给它 并使用此十六进制字符串更改背景颜色。 我需要知道是否有背景颜色方法可以带参数 hexString 或 long 。
代码:
String colorValue = getIntent().getStringExtra("colorHex");
findViewById(R.id.layout1).setBackgroundColor(Color.parseColor(colorValue));//want change in the argument or if there's another method.
【问题讨论】:
标签: android android-activity colors hex