Set image width and height in ImageView
问题 No matter what I try, I cannot set the width and height of my image that is passed from a soap service to my android emulator. I'm using an ImageView as follows: byte[] bloc = Base64.decode(result, Base64.DEFAULT); Bitmap bmp = BitmapFactory.decodeByteArray(bloc,0,bloc.length); ImageView image = new ImageView(this); image.setImageBitmap(bmp); image.setLayoutParams( new LinearLayout.LayoutParams( LinearLayout.LayoutParams.WRAP_CONTENT, LinearLayout.LayoutParams.WRAP_CONTENT)); image