0

I want to use this style, which is an Android Build in Style Attribute, but it won't compile. I' am missing some kind of Import?

?android:attr/listItemFirstLineStyle

<TextView
      android:id="@+id/text"
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:layout_weight="1" android:layout_gravity="left|center_vertical" style="?android:attr/listItemFirstLineStyle" android:layout_marginLeft="10dip"/>`

thx

2 Answers 2

2

did you try to remove the question mark?

style="android:attr/listItemFirstLineStyle"

Sign up to request clarification or add additional context in comments.

1 Comment

The "?" is required when you want to access build in attributes
0

You can't access all build in styles in your own projects. When you type so far in Eclipse

style="@android:style/"

and hit ctrl + enter, intellisense should give you an overview of what you can use. There are underscores in the style names, replace them by '.'...

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.