Package net. Android. touming;
Import Android. widget. textview;
Import Android. OS. Bundle;
Import Android. View. viewgroup;
Import Android. App. activity;
Import Android. Graphics. color;
Import Android. widget. linearlayout;
Public class touming extends activity {
Final int wrap_content = viewgroup. layoutparams. wrap_content;
Public void oncreate (bundle icicle ){
Super. oncreate (icicle );
Linearlayout = new linearlayout (this );
Linearlayout. setorientation (linearlayout. Vertical );
Setcontentview (linearlayout );
Textview textview1 = new textview (this );
Textview1.settext ("All opaque = 255 ");
// Textview1.setbackgroundcolor (color. argb (255, 0,255, 0); // background transparency
Textview1.settextcolor (color. argb (255, 0,255, 0); // text transparency
Linearlayout. addview (textview1, new linearlayout. layoutparams (wrap_content,
Wrap_content ));
Textview textview2 = new textview (this );
Textview2.settext ("partial passthrough 155 ");
Textview2.setbackgroundcolor (color. argb (155, 0,255, 0); // background transparency
Textview2.settextcolor (color. argb (155, 0,255, 0); // text transparency
Linearlayout. addview (textview2, new linearlayout. layoutparams (wrap_content,
Wrap_content ));
Textview textview3 = new textview (this );
Textview3.settext ("partially transparent 55 ");
Textview3.setbackgroundcolor (color. argb (55, 0,255, 0); // background transparency
Textview3.settextcolor (color. argb (55, 0,255, 0); // text transparency
Linearlayout. addview (textview3, new linearlayout. layoutparams (wrap_content,
Wrap_content ));
Textview textview4 = new textview (this );
Textview4.settext ("all transparent 0 ");
// Textview4.setbackgroundcolor (color. argb (0, 0,255, 0); // background transparency
Textview4.settextcolor (color. argb (0, 0,255, 0); // text transparency
Linearlayout. addview (textview4, new linearlayout. layoutparams (wrap_content,
Wrap_content ));
}
}