Question

this is my first question on here and I have been looking and can't seem to find the answer, my question is, how does one know when to use underscores versus using periods when referencing within android xml files?

This code for example:

android:theme = "@android:style/Theme.Holo.Light"

Uses periods instead of underscores when the actual name of the variable is:

Theme_Holo_Light

What is the reason for this? Or is it just how android parses the XML?

Was it helpful?

Solution

In short answer,

Use periods in xml,

and use underscore when you're referring an id programmatically. For example mThemeId = android.R.style.Theme_Holo_Light

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top