阅读背景:

ImageView圆角

来源:互联网 

activity_main.xml

<ScrollView xmlns:android="https://schemas.android.com/apk/res/android"
    xmlns:CustomImageView="https://schemas.android.com/apk/res/com.example.customview05imageview"
    xmlns:tools="https://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent" >

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical" >

        <com.example.customview05imageview.RoundImageView
            android:layout_width="wrap_content"
            android:layout_margin="5dp"
            android:layout_height="wrap_content"
            android:src="@drawable/icon" />
        
        <ImageView
          android:id="@+id/imageview"
            android:layout_margin="5dp"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:src="@drawable/icon" />

        <com.example.customview05imageview.view.CustomImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_margin="10dp"
            CustomImageView:src="@drawable/icon"
            CustomImageView:type="circle" />

        <com.example.customview05imageview.view.CustomImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_margin="10dp"
            CustomImageView:borderRadius="10dp"
            CustomImageView:src="@drawable/icon"
            CustomImageView:type="round" />

        <com.example.customview05imageview.view.CustomImageView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_margin="10dp"
            CustomImageView:borderRadius="20dp"
            CustomImageView:src="@drawable/icon"
            CustomImageView:type="round" />
    </LinearLayout>

</ScrollView><ScrollView xmlns:android="http




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: