英文:
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.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论