title: Using dots in xml ids
body: <p>this is my first question</p>
  
  <p><strong>In Java I have never had this problem before.</strong> </p>
  
  <p>I spent two days because I had an issue <strong>just on design mode</strong> on Android studio inflating a CustomView with <strong>kotlin</strong>. I had a findByView = null after the inflate. Running the app, all is right</p>
  
  <pre><code>View.inflate(context, R.layout.widget_navigation_section_button, this) 
  mLabel = findViewById(R.id.navigation_section_title)
  mLabel.setText("something")
  </code></pre>
  
  <p>That throws a NPE <em>(for real in kotlin: kotlin.TypeCastException: null cannot be cast to non-null type android.widget.TextView   at ... $mLabel$2.invoke(CustomView.kt:22))</em></p>
  
  <p>Normally, I use a <code>&lt;layout&gt;[.&lt;where_container&gt;].&lt;name&gt;</code> pattern to name ids and string on XMls (ex: <code>android:id="@+id/main.description_container.title"</code>)<br>
  This is translated automatically in <code>R.id.main_description_container_title</code>(notice dots become underscores) in code</p>
  
  <p>The issue was solved when I replace these dots with underscores manually in the XML</p>
  
  <p>I was looking for name conventions explaining why dots should not used in ids or string naming, but without success. I want to know what is the real issue with this name convention. This should be really avoid it ? </p>
  
  <p>Should I just drop the idea and just user underscores ? Looking at it is an issue just on kotlin, maybe some gradle configuration ther ?</p>
  
  <p>Thank you in advance</p>