安卓资源颜色的返回类型是什么?

huangapple go评论71阅读模式
英文:

Return type of resource color android?

问题

The return type of something starting with R like a color in Android is an integer.

For instance, R.color.black, I want to create a helper function like

public int getColor(){

   return R.color.black;

}

What is the RETURN_TYPE supposed to be?

英文:

What is the return type of something starting with R like a color in Android.

For instance, R.color.black, I want to create a helper function like

public RETURN_TYPE getColor(){

   return R.color.black;

}

What is the RETURN_TYPE supposed to be?

答案1

得分: 1

我认为R.color.black背后的值是一个整数。

我在官方文档中找到了这个信息。

希望我的回答对您有帮助。

英文:

I think the value behind R.color.black is an integer.

I found this info in the official doc.

Hope my answer was helpfull.

huangapple
  • 本文由 发表于 2020年10月6日 19:04:20
  • 转载请务必保留本文链接:https://go.coder-hub.com/64224500.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定