Android id naming convention: lower case with underscore vs. camel case

后端 未结 8 605
北荒
北荒 2020-11-30 21:26

I\'m currently programming an application for the Android. Now what I found out is that you cannot place resource objects, say, an image in the drawable folder and name it l

相关标签:
8条回答
  • 2020-11-30 22:19

    If you look at some of Googles app samples such as:

    https://github.com/google/iosched

    They use underscores. So.... maybe that is how we should be doing it?

    0 讨论(0)
  • 2020-11-30 22:31

    I think if we use underscore convention for id in xml files and camel case convention for class fields then it will give better visibility to every developer to distinguish between xml ids and class fields.

    0 讨论(0)
提交回复
热议问题