侧拉图片圆角

 找控件之后的方法

imageView = findViewById(R.id.imageView1);
        DisplayImageOptions dis = MApp.getDis();
        ImageLoader.getInstance().displayImage(urlBitmap,imageView,dis);

布局

<FrameLayout
        android:id="@+id/mFl"
        android:layout_width="300dp"
        android:layout_height="match_parent"
        android:layout_gravity="left"
        android:background="#0ff"
        android:orientation="vertical">


        <ImageView
            android:id="@+id/imageView1"
            android:layout_width="100dp"
            android:layout_height="100dp"
            android:layout_marginTop="50dp"
            android:layout_marginLeft="50dp"
            android:src="@drawable/ic_launcher_background"/>

        <ListView
            android:id="@+id/mLv1"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_marginTop="200dp"
            android:layout_gravity="left"></ListView>

    </FrameLayout>

写个静态方法

public static DisplayImageOptions getDis(){
        DisplayImageOptions displayImageOptions = new DisplayImageOptions.Builder()
                .showImageOnFail(R.mipmap.ic_launcher)
                .showImageForEmptyUri(R.mipmap.ic_launcher)
                .showImageOnLoading(R.mipmap.ic_launcher)
                .displayer(new RoundedBitmapDisplayer(360))
                .build();
        return displayImageOptions;
    }

猜你喜欢

转载自blog.csdn.net/qq_42634876/article/details/86234040