如何将TextView背景颜色更改为初始值

Ric*_*eng 5 android textview

在我将TextView backgroundColor设置为我想要的任何内容之后.

Fri2030 =(TextView)findViewById(R.id.tvFri2030); Fri2030.setBackgroundColor(Color.BLUE);

如果我不想要任何颜色并初始化它,如何清理TextView backgroundColor.(不想用其他颜色覆盖)

thx的帮助!!

Rao*_*rge 8

setBackgroundColor(android.R.color.transparent);
Run Code Online (Sandbox Code Playgroud)


Tof*_*mad 3

这可能会帮助您...一旦存储所有这些值,稍后当您需要它时,然后使用它们---

        TextView text=new TextView(this);
    text.getCurrentHintTextColor();
    text.getCurrentTextColor();
    text.getDrawingCacheBackgroundColor();
Run Code Online (Sandbox Code Playgroud)