Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
596 views
in Technique[技术] by (71.8m points)

background color - removing backgroundcolor of a view in android

Removing Background color in Android

I have set backgroundColor in code like this,

View.setBackgroundColor(0xFFFF0000);

How to remove this background color on some event?

question from:https://stackoverflow.com/questions/4051005/removing-backgroundcolor-of-a-view-in-android

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

You should try setting the background color to transparent:

view.setBackgroundColor(0x00000000);


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...