What's the difference between
android:color="@android:color/black"
and
style="?android:attr/borderlessButtonStyle"
What's the difference between the @
and ?
?
This is one of those questions which is ungoogleable, or ogooglebar.
@android:color/black
means you are referring to an color defined in the android namespace. This namespace is the namespace of the framework.
search black in this file: black color in framework
style="?android:attr/borderlessButtonStyle"
"?android:attr/borderlessButtonStyle" simply means "use the value defined by the attribute called borderlessButtonStyle in the namespace android." This attribute and its value are part of the Android framework, the "android" namespace.
borderlessButtonStyle in framework
Edited: from this Referencing Style Attributes
this link tell us:
For example, here's how you can reference an attribute to set the text color to match the "primary" text color of the system theme:
<EditText id="text"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:textColor="?android:textColorSecondary"
android:text="@string/hello_world" />
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With