GithubHelp home page GithubHelp logo

vennxu / roundimageview Goto Github PK

View Code? Open in Web Editor NEW

This project forked from luqinmao/roundimageview

0.0 1.0 0.0 1.22 MB

自定义圆角ImageView,包括任意圆角矩形、圆形、椭圆形、定义图形边框与颜色,进度条等,方便使用

Java 100.00%

roundimageview's Introduction

自定义圆角ImageView,包括任意圆角矩形、圆形、椭圆形、定义图形边框与颜色,进度条等

效果图

gradle引用

compile 'com.lqm:RoundImageView:1.0.0'

示例代码#

<?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"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center_horizontal"
android:orientation="vertical">

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

    <com.lqm.roundview.RoundImageView
        android:layout_width="120dp"
        android:layout_height="120dp"
        android:layout_margin="10dp"
        android:scaleType="fitXY"
        android:src="@mipmap/image_1"
        app:corner_radius="20dp" />

    <com.lqm.roundview.RoundImageView
        android:layout_width="120dp"
        android:layout_height="120dp"
        android:layout_margin="10dp"
        android:scaleType="fitXY"
        android:src="@mipmap/image_1"
        app:rightBottom_corner_radius="20dp"
        app:rightTop_corner_radius="10dp" />

</LinearLayout>

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

    <com.lqm.roundview.RoundImageView
        android:layout_width="120dp"
        android:layout_height="120dp"
        android:layout_margin="10dp"
        android:scaleType="fitXY"
        android:src="@mipmap/image_2"
        app:border_color="#68f"
        app:border_width="5dp"
        app:type="circle" />

    <com.lqm.roundview.RoundImageView
        android:layout_width="120dp"
        android:layout_height="80dp"
        android:scaleType="fitXY"
        android:src="@mipmap/image_2"
        app:border_color="#9999"
        app:border_width="1dp"
        app:type="oval" />

</LinearLayout>

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

    <com.lqm.roundview.RoundImageView
        android:id="@+id/iv_progress"
        android:layout_width="130dp"
        android:layout_height="130dp"
        android:scaleType="fitXY"
        android:src="@mipmap/image_3"
        app:border_color="#93dfdd"
        app:border_width="5dp"
        app:type="circle"
        android:layout_margin="10dp"
        />

    <com.lqm.roundview.RoundImageView
        android:layout_width="130dp"
        android:layout_height="130dp"
        android:scaleType="fitXY"
        android:src="@mipmap/image_3"
        app:border_color="#7195ae"
        app:border_width="5dp"
        app:type="circle"
        app:progress_border="120"
        app:progress_color="#eda167"
        android:layout_margin="10dp"
        />
</LinearLayout>

roundimageview's People

Contributors

luqinmao avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.