Ok, here's a simple 'helloorange' activity:
--
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
TextView tv = new TextView(this);
tv.setText("some text");
tv.setBackgroundDrawable(getResources().getDrawable
(android.R.drawable.list_selector_background));
setContentView(tv);
}
--
When running this, the background doesn't change it's color. When I
change to android.R.drawable.btn_default, it works.
So, how do I apply orange background drawable to a TextView at
runtime?
TIA.
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---