ImageView的ScaleType

1.代码

10年积累的网站设计制作、成都网站制作经验,可以快速应对客户对网站的新想法和需求。提供各种问题对应的解决方案。让选择我们的客户得到更好、更有力的网络服务。我虽然不认识你,你也不认识我。但先网站策划后付款的网站建设流程,更有平阴免费网站建设让你可以放心的选择与我们合作。

ImageView的ScaleType

<?xml version="1.0" encoding="utf-8"?><LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:context="com.market.circlep_w_picpath.MainActivity">
    <LinearLayout        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal">
        <com.makeramen.roundedp_w_picpathview.RoundedImageView            xmlns:app="http://schemas.android.com/apk/res-auto"
            android:scaleType="fitCenter"
            app:riv_corner_radius="50dip"
            app:riv_border_width="4dip"
            app:riv_border_color="#ff0000"
            app:riv_mutate_background="true"
            android:src="@drawable/x1"
            app:riv_oval="true"
            android:layout_width="100dp"
            android:layout_height="100dp" />
        <com.makeramen.roundedp_w_picpathview.RoundedImageView            xmlns:app="http://schemas.android.com/apk/res-auto"
            android:scaleType="fitXY"
            app:riv_corner_radius="50dip"
            app:riv_border_width="4dip"
            app:riv_border_color="#ff0000"
            app:riv_mutate_background="true"
            android:src="@drawable/x1"
            app:riv_oval="true"
            android:layout_width="100dp"
            android:layout_height="100dp" />


        <com.makeramen.roundedp_w_picpathview.RoundedImageView            android:scaleType="fitEnd"
            app:riv_corner_radius="50dip"
            app:riv_border_width="4dip"
            app:riv_border_color="#ff0000"
            app:riv_mutate_background="true"
            android:src="@drawable/x1"
            app:riv_oval="true"
            android:layout_width="100dp"
            android:layout_height="100dp"
            android:id="@+id/roundedImageView" />

    </LinearLayout>
    <LinearLayout        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal">
        <com.makeramen.roundedp_w_picpathview.RoundedImageView            xmlns:app="http://schemas.android.com/apk/res-auto"
            android:scaleType="fitStart"
            app:riv_corner_radius="50dip"
            app:riv_border_width="4dip"
            app:riv_border_color="#ff0000"
            app:riv_mutate_background="true"
            android:src="@drawable/x1"
            app:riv_oval="true"
            android:layout_width="100dp"
            android:layout_height="100dp" />
        <com.makeramen.roundedp_w_picpathview.RoundedImageView            xmlns:app="http://schemas.android.com/apk/res-auto"
            android:scaleType="center"
            app:riv_corner_radius="50dip"
            app:riv_border_width="4dip"
            app:riv_border_color="#ff0000"
            app:riv_mutate_background="true"
            android:src="@drawable/x1"
            app:riv_oval="true"
            android:layout_width="100dp"
            android:layout_height="100dp" />


        <com.makeramen.roundedp_w_picpathview.RoundedImageView            android:scaleType="centerCrop"
            app:riv_corner_radius="50dip"
            app:riv_border_width="4dip"
            app:riv_border_color="#ff0000"
            app:riv_mutate_background="true"
            android:src="@drawable/x1"
            app:riv_oval="true"
            android:layout_width="100dp"
            android:layout_height="100dp" />

    </LinearLayout>
    <com.makeramen.roundedp_w_picpathview.RoundedImageView        android:scaleType="centerInside"
        app:riv_corner_radius="50dip"
        app:riv_border_width="4dip"
        app:riv_border_color="#ff0000"
        app:riv_mutate_background="true"
        android:src="@drawable/x1"
        app:riv_oval="true"
        android:layout_width="100dp"
        android:layout_height="100dp" />
    <com.makeramen.roundedp_w_picpathview.RoundedImageView        android:scaleType="matrix"
        app:riv_corner_radius="50dip"
        app:riv_border_width="4dip"
        app:riv_border_color="#ff0000"
        app:riv_mutate_background="true"
        android:src="@drawable/x1"
        app:riv_oval="true"
        android:layout_width="200dp"
        android:layout_height="200dp" /></LinearLayout>

ImageView的ScaleType

2.效果

ImageView的ScaleType

分享文章:ImageView的ScaleType
转载来源:https://www.cdcxhl.com/article22/ghddcc.html

成都网站建设公司_创新互联,为您提供外贸网站建设面包屑导航外贸建站用户体验企业网站制作Google

广告

声明:本网站发布的内容(图片、视频和文字)以用户投稿、用户转载内容为主,如果涉及侵权请尽快告知,我们将会在第一时间删除。文章观点不代表本网站立场,如需处理请联系客服。电话:028-86922220;邮箱:631063699@qq.com。内容未经允许不得转载,或转载时需注明来源: 创新互联

成都定制网站建设