Code example for ImageView

Methods: setImageBitmap

0
                        Bitmap.Config.ARGB_8888);
                Canvas c = new Canvas(b);
                c.drawColor(0, PorterDuff.Mode.CLEAR);
                gamma.draw(c);
 
                ImageView image = new ImageView(TextGammaActivity.this);
                image.setImageBitmap(b);
 
                layout.addView(image, new LinearLayout.LayoutParams(
                        LinearLayout.LayoutParams.WRAP_CONTENT,
                        LinearLayout.LayoutParams.WRAP_CONTENT
                )); 
 
                startActivity(new Intent(TextGammaActivity.this, SubGammaActivity.class));
            } 
        }); 
 
        getWindow().setBackgroundDrawable(new ColorDrawable(0xffffffff));
    } 
 
    static class GammaTextView extends LinearLayout {