92Jacko
92Jacko

Reputation: 523

finding the correct style in R.attr

using:

android:textAppearance="?android:attr/...."

I would like to style a TextView to look like the default style of the "summary" attribute within a PreferenceScreen.

using the styles from this official list, I have tried "summary" and "summaryOn", but neither of them looks like the default style for summaries. Can anyone explain why, or suggest which one I should be using?

Upvotes: 1

Views: 1054

Answers (2)

adamp
adamp

Reputation: 28932

There isn't a theme attribute that refers to the specific semantic of preference summary text, preferences use ?android:attr/textAppearanceSmall as illustrated here: http://goo.gl/3yZmx (This is the layout file used by the Android framework for preference items.)

Upvotes: 3

CrackerJack9
CrackerJack9

Reputation: 3651

The correct way to reference an ID is using @.

Such as @string/my_string

Since you wish to reference an ID defined by Android directly, try this:

android:textAppearance="@android:id/summary"

Upvotes: 0

Related Questions