Frage

I know how to set a button borderless in xml.But how to set button borderless in source code, because it is created dynamically.

Keine korrekte Lösung

Andere Tipps

Make button image and do:

button.setBackgroundResource(R.drawable.button_image);
button.setBackgroundResource(android.R.color.transparent);

don't forget to put exactly:

android.R.color.transparent

if you put R.color.transparent only (without android), there will be an error in the code when doing this

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top