may be help try this ImageView mImageView = new ImageView(this); mImageView.setScaleType(ImageView.ScaleType.FIT_CENTER); mImageView.setImageResource(R.drawable.wall_img02); mImageView.setFocusable(true); mImageView.setFocusableInTouchMode(true); mImageView.invalidate(); setContentView(R.layout.myimageview);
On Apr 25, 4:11 pm, mack2978 <[email protected]> wrote: > Pls help.. > > On Apr 25, 3:54 pm, mack2978 <[email protected]> wrote: > > > > > > > > > Hi All, > > > I am trying to display the image on run time using ImageView, but it > > is not showing up, below is the code: Please sugegst what is the issue > > > super.onCreate(savedInstanceState); > > setContentView(R.layout.myimageview); > > mImageView = (ImageView) findViewById(R.id.imageview); > > mImageView.setScaleType(ImageView.ScaleType.FIT_CENTER); > > mImageView.setImageResource(R.drawable.wall_img02); > > mImageView.setFocusable(true); > > mImageView.setFocusableInTouchMode(true); > > mImageView.invalidate(); > > > Thanks -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

