пʼятниця, 10 грудня 2010 р.

Custom Android Button Style

If you need to draw non standard button in android, you could do like described here:
http://blog.androgames.net/40/custom-button-style-and-theme/ . Very nice.
Or you could just do in your code, like that
   Button yourButton = (Button) findViewById(R.id.idForYourButton);
    yourButton.getBackground().setColorFilter(0xff00ffff, PorterDuff.Mode.MULTIPLY);
you could define color 0xff00ffff in your color.xml, and get it by R.color.your_color.

Немає коментарів:

Дописати коментар