Mike Keskinov
Mike Keskinov

Reputation: 11878

selectableItemBackground not found

I'm trying to set borderless background to button (and it must be highlighted when pressed). To do so I'm try to set:

android:background="?android:attr/selectableItemBackground"

(as described here)

But get error:

error: Error: No resource found that matches the given name (at 'background' with value '?android:attr/selectableItemBackground').

API level 1.6, also tried API 2.2

Upvotes: 2

Views: 4730

Answers (2)

inteist
inteist

Reputation: 503

This only available from API Level 11 i.e. Android 3.0

Upvotes: 5

Aerilys
Aerilys

Reputation: 1639

Sounds like ?android:attr/selectableItemBackground is not a ressource but an attribute. You have to specify a ressource on android:background property.

Upvotes: 1

Related Questions