?MyCompanyStyle should ultimately resolve to @style/something, via the
theme.
You can check the Android sources, under
<android-sdk>\platforms\android-X\data\res\values. Look for themes.xml,
styles.xml, attrs.xml. These files have a lot of style references.
For example:
<!-- Widget styles -->
<item
name="absListViewStyle">@android:style/Widget.AbsListView</item>
<item
name="autoCompleteTextViewStyle">@android:style/Widget.AutoCompleteTextView</item>
<item
name="checkboxStyle">@android:style/Widget.CompoundButton.CheckBox</item>
<item
name="dropDownListViewStyle">@android:style/Widget.ListView.DropDown</item>
<item name="editTextStyle">@android:style/Widget.EditText</item>
<item
name="expandableListViewStyle">@android:style/Widget.ExpandableListView</item>
<item
name="expandableListViewWhiteStyle">@android:style/Widget.ExpandableListView.White</item>
and so on for all the standard widget (view) classes.
-- Kostya
2011/6/9 Danny D <[email protected]>
> Thanks Kostya,
>
> I think I'm doing pretty much what you said (I'll check again), I'm
> trying to use the "?foo" reference to dynamically set the style of an
> individual view or view-group.
>
> 1) I've created my own fixed styles, there are three of these. I want
> to select one of the three by setting the theme.
>
> 2) Put the selection of the overall theme into the <activity ...>
> element within the manifest. This is pretty much by the book too.
>
> 3) The views seem to be happy, but there seems to be some type of
> difference between these two types of assignments
>
> <Button style="?MyCompanyButtonStyle" <---- Setting
> the View's style by reference (contains multiple attributes).
> android:id="@android:id/button1"
> android:text="@string/button_cancel"
> android:layout_weight="1"/>
>
>
> and the example in Android SDK
>
> <EditText id="text"
> android:layout_width="fill_parent"
> android:layout_height="wrap_content"
> android:textColor="?android:textColorSecondary" <----
> One property being set by reference.
> android:text="@string/hello_world" />
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en