Hi,

I have a linear layout, and I wanted to set its background to be a
rounded rect. I defined the background like so:

<shape xmlns:android="http://schemas.android.com/apk/res/android";>
  <stroke android:width="1dip" />
  <padding android:left="7dip" android:top="7dip" android:right="7dip"
android:bottom="7dip" />
  <corners android:radius="4dip" />
</shape>

that works ok, but I also wanted to make the background turn orange
when clicked (like as in a listview). In the past, I've done this to
get that effect:

  myView.setBackgroundDrawable(
     getDrawable(android.R.drawable.list_selector_background));

but this will just override the shape background definition I supplied
above. Do I have to make a state list, comprised of my shape
definition above, and another shape definition where the background is
orange?

Thanks

-- 
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

Reply via email to