请问我如何在java里创建一个imageview用来显示图片

我想做一个画板,现在需要增加一个插入图片的功能。
目前我自定义了一个View来实现画线等功能,然后在MainActivity里创建了它,所以我不知道该怎么添加imageview来放置图片了,或者还有别的方法能实现?

用imageview不好,应该直接用canvas.drawBitmap画就可以了。
参考:https://blog.csdn.net/lovexieyuan520/article/details/50725539

``` LinearLayout ll= (LinearLayout) this.findViewById(R.id.actClient_LinearLayout);
ll.removeView(img_preview);
img_preview=new ImageView(this);

img_preview.setBackgroundResource(R.drawable.girl);
ll.addView(img_preview);


        private ImageView imageView;
        imageView = (ImageView)findViewById(R.id.image);
    //获得图片:
    //方式一:直接从res中取图片
        image.setImageResource(R.drawable.ic_launcher);

    //方式二:通过Bitmap对象,通过bitMap工厂进行解码
        Bitmap bitMap = BitmapFactory.decodeResource(getResources(), R.drawable.ha);
        image.setImageBitmap(bitMap);

    //方式三:通过Drawable对象
        Drawable drawable = getResources().getDrawable(R.drawable.ha);
        image.setImageDrawable(drawable);