@@ -0,0 +1,1053 @@
+package com.ds.myapp.view;%0A%0Aimport android.annotation.TargetApi;%0Aimport android.content.Context;%0Aimport android.graphics.Bitmap;%0Aimport android.graphics.drawable.BitmapDrawable;%0Aimport android.graphics.drawable.Drawable;%0Aimport android.os.Build;%0Aimport android.util.AttributeSet;%0Aimport android.widget.ImageView;%0A%0A/**%0A * Created by Administrator on 2016/11/3.%0A */%0A%0Apublic class SetSizeImageView extends ImageView %7B%0A    public SetSizeImageView(Context context) %7B%0A        this(context,null);%0A    %7D%0A%0A    public SetSizeImageView(Context context, AttributeSet attrs) %7B%0A        this(context, attrs,0);%0A    %7D%0A%0A    public SetSizeImageView(Context context, AttributeSet attrs, int defStyleAttr) %7B%0A        super(context, attrs, defStyleAttr);%0A    %7D%0A%0A    @TargetApi(Build.VERSION_CODES.JELLY_BEAN)%0A    @Override%0A    public void setImageBitmap(Bitmap bm) %7B%0A        setBackground(new BitmapDrawable());%0A    %7D%0A%0A    @TargetApi(Build.VERSION_CODES.JELLY_BEAN)%0A    @Override%0A    public void setImageDrawable(Drawable drawable) %7B%0A        setBackground(drawable);%0A    %7D%0A%7D%0A

设置image大小 由于bitmap的图片无法全屏