如何将整数ex:13369395中的颜色代码转换为特定于android.由于13369395也是我试过的整数
mainLayout.setTextColor(13369395);
Run Code Online (Sandbox Code Playgroud)
但它不起作用.
我也尝试将13369395转换为十六进制,如:
mainLayout.setBackgroundColor(Integer.parseInt(13369395 +"", 16)+0xFF000000);
Run Code Online (Sandbox Code Playgroud)
但它也没有帮助.
我正在建立与服务器的连接及其正常工作.但有时我尝试获取响应代码(当服务器正在抛回401,403,404时)我得到IO异常.我根据响应代码处理所有内容.所以当它抛出IO异常时
http.getResponseCode()
Run Code Online (Sandbox Code Playgroud)
我无法阅读响应代码.请为此建议一个解决方案.