Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove the background of a textview

I set a background for a textview and I want to remove it dynamically but it dosen't work, are there any suggestion?

if (mToday) {
        monthView[mRow][mColumn].setBackgroundResource(R.color.black);
    }
    else {
        monthView[mRow][mColumn].setBackgroundResource(0);
    }

I found a reasonable explanation here why it is happen, but again didn't solve the problem.

like image 879
Mahdak Avatar asked Mar 02 '13 06:03

Mahdak


1 Answers

try this.

txtEmail.setBackgroundResource(android.R.color.transparent);
like image 65
KDeogharkar Avatar answered Oct 11 '22 13:10

KDeogharkar