0

Help me figure out what is the standard for writing xml? Which one do you use on the project?

If I use: id = "@ + id / text_view" and this is the correct standard as far as I know.

But if I use ViewBinding from Jetpack from Google, then my name "text_view" in the code turns into "textView" binding.textview

I understand correctly? If I use view binding then in xml can I use Camel case when writing view names? Otherwise your eyes get confused if you use "text_view" in xml and see the result "textview" in the code ...

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
  • I would prefer to go with camel-case as android itself generate in camel-case format can be seen @ `android.R.id.*`. another question reference https://stackoverflow.com/questions/1832290/android-id-naming-convention-lower-case-with-underscore-vs-camel-case – Amir Raza Jul 12 '21 at 10:09
  • thx, for you help me – Dima Gaziev Oct 07 '21 at 19:17

0 Answers0