set bitmap to background of ImageView with imageView.setImageBitmap method

前端 未结 6 965
野趣味
野趣味 2021-01-31 15:16

I have an ImageView. I am using imageView.setImageBitmap to set my image as background to ImageView. But it sets my image to ImageVi

6条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-31 16:12

    Please Use the following line to set image background.

    imageview.setBackground(getResources().getDrawable(R.drawable.uporder));
    

    Here uporder is an image resource present in your drawablefolder.

提交回复
热议问题