layout文件里的写法:
<TextView android:id="@+id/disable_div" android:layout_width="fill_parent" android:layout_height="fill_parent" android:gravity="center" android:visibility="gone" />
java文件的写法(0x80000000是灰色,值可以自己选):
disable_div = (TextView) findViewById(R.id.disable_div);disable_div.setBackgroundColor(0x80000000);