Why is it that some attributes like android:layout_width is put together with an underscore? While e.g android:textColor is instead using camel-casing?
Why not stick entirely with one style (either underscore or camel-casing)?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
These are not cases of different style. The second case is a simple attribute which is used by an element. The first one is an attribute which is assigned to an element, but is used by a layout. This is emphasized by the underscore-separated prefix. If you happen to look at such an attribute as
android:layout_marginTop, you’ll see that these two seemingly separate styles are actually parts of a single idea.