¡@

Home 

2014/10/16 ¤W¤È 08:16:38

android Programming Glossary: iv.setbackgroundcolor

set the absolute position of a view in Android

http://stackoverflow.com/questions/3294590/set-the-absolute-position-of-a-view-in-android

findViewById R.id.my_relative_layout ImageView iv RelativeLayout.LayoutParams params iv new ImageView this iv.setBackgroundColor Color.YELLOW params new RelativeLayout.LayoutParams 30 40 params.leftMargin 50 params.topMargin 60 rl.addView iv params.. RelativeLayout.LayoutParams 30 40 params.leftMargin 50 params.topMargin 60 rl.addView iv params iv new ImageView this iv.setBackgroundColor Color.RED params new RelativeLayout.LayoutParams 30 40 params.leftMargin 80 params.topMargin 90 rl.addView iv params Places.. params int yellow_iv_id 123 Some arbitrary ID value. iv new ImageView this iv.setId yellow_iv_id iv.setBackgroundColor Color.YELLOW params new RelativeLayout.LayoutParams 30 40 params.leftMargin 50 params.topMargin 60 rl.addView iv params..

Converting a TextView->Bitmap->ImageView, and nothing's showing up

http://stackoverflow.com/questions/4167593/converting-a-textview-bitmap-imageview-and-nothings-showing-up

0x555555 Bitmap testB testB loadBitmapFromView tv ImageView iv new ImageView this iv.setLayoutParams layoutParams iv.setBackgroundColor 0x555555 iv.setImageBitmap testB setContentView iv public static Bitmap loadBitmapFromView View v Bitmap b Bitmap.createBitmap.. testB tv.layout 0 0 80 100 tv.draw c ImageView iv ImageView findViewById R.id.menuIcon iv.setLayoutParams layoutParams iv.setBackgroundColor Color.GRAY iv.setImageBitmap testB iv.setMaxHeight 80 iv.setMaxWidth 80 And in your main.xml file LinearLayout xmlns android..