2

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

Community
  • 1
  • 1
Mike Keskinov
  • 11,614
  • 6
  • 59
  • 87

2 Answers2

5

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

inteist
  • 493
  • 8
  • 15
1

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

Aerilys
  • 1,628
  • 1
  • 16
  • 22
  • I'm following accepted answer for this question: http://stackoverflow.com/questions/8855791/how-to-create-standard-borderless-buttons-like-in-the-design-guidline-mentioned. See it for detailes. – Mike Keskinov Aug 23 '12 at 16:39