문제

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?

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top