RoundedImageView-Library 0.9 0.0 Java To set single or multiple corners on Image Views.

Overview

RoundedImageView-Library

Rounded ImageView Android Library, to set single or multiple corners on imageview.

API

Screenshot

Screenshot

Usage

Step 1. Add the JitPack repository to your build file

allprojects {
        repositories {
            ...
            maven { url "https://jitpack.io" }
        }
    }

Step 2. Add the dependency

dependencies {
  compile 'com.github.DushyantMainwal:RoundedImageView-Library:0.3.0'
 }

Implementation

###XML Implementation:

 <com.dushyant.roundedimageviewlibrary.RoundedImageView
            android:id="@+id/image_view"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            app:scaleType="centerCrop"
            app:border="true"
            app:borderColor="#089"
            app:borderWidth="10dp"
            app:canvasPadding="10"
            app:imagePadding="10"
            app:cornerRadius="30"
            app:src="@drawable/rdjimage"
            app:cornerType="bottomLeft"/>
        

###Java Implementation:

        RoundedImageView customImageView = findViewById(R.id.image_view);
        customImageView.setImageResource(R.drawable.rdjimage);
        customImageView.setImageScaleType(RoundedImageView.ScaleType.CENTRE_CROP);
        
        //For Single Corner
        customImageView.setCornerType(RoundedImageView.CornerType.BOTTOM_RIGHT_CORNER);

        customImageView.setImagePadding(20);
        customImageView.setCanvasPadding(50);

        customImageView.setBorder(true);
        customImageView.setBorderColor(Color.DKGRAY);
        customImageView.setBorderWidth(40);
        
        customImageView.setCornerRadius(30);

        //For Multiple Corners
        List<RoundedImageView.CornerType> cornerTypes = new ArrayList<>();
        cornerTypes.add(RoundedImageView.CornerType.TOP_LEFT_CORNER);
        cornerTypes.add(RoundedImageView.CornerType.TOP_RIGHT_CORNER);
        customImageView.setCornerTypeList(cornerTypes);

##Picasso Implementation:

         Picasso.with(this).load("https://www.gstatic.com/webp/gallery/5.sm.jpg").into(customImageView);

###Glide Implementation:

         Glide.with(this)
                .load("https://www.w3schools.com/w3css/img_lights.jpg")
                .asBitmap()
                .into(new SimpleTarget<Bitmap>() {
                    @Override
                    public void onResourceReady(Bitmap resource, GlideAnimation<? super Bitmap> glideAnimation) {
                        customImageView.setImageBitmap(resource);
                    }
                });
                
        //With Drawable
        Glide.with(this)
                .load("https://www.w3schools.com/w3css/img_lights.jpg")
                .into(new SimpleTarget<GlideDrawable>() {
                    @Override
                    public void onResourceReady(GlideDrawable resource, GlideAnimation<? super GlideDrawable> glideAnimation) {
                        customImageView.setImageDrawable(resource);
                    }
                });

#Licence

Copyright (c) 2016 Dushyant Mainwal

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
You might also like...
An image resizing library for Android
An image resizing library for Android

Resizer Inspired by zetbaitsu's Compressor, Resizer is a lightweight and easy-to-use Android library for image scaling. It allows you to resize an ima

Simple android image popup Library
Simple android image popup Library

Android Image Popup Show image as a popup on a click event or any event. Simply set the image as drawable and thats it!!!. And also you can set width,

Library to save image locally and shows options to open and share !

Image Save and Share Library to save image locally and shows options to open and share ! Download Demo APK from HERE Kindly use the following links to

Image loading library for Android

Image Loader Image loader library for Android. Deprecated. See Glide. Features Image transformations Automatic memory and storage caching Ability to l

A library for image manipulation with power of renderScript which is faster than other ordinary solutions.
A library for image manipulation with power of renderScript which is faster than other ordinary solutions.

Pixl is a library for image manipulation with power of renderScript which is faster than other ordinary solutions, currently it includes three basic scripts, brightness, contrast, saturation.

Image Cropping Library for Android, optimised for Camera / Gallery.
Image Cropping Library for Android, optimised for Camera / Gallery.

Image Cropping Library for Android, optimised for Camera / Gallery.

An image loading library for android.

Bilder Download Add following to your project's build.gradle allprojects { repositories { ... maven { url 'https://jitpack.io' } } }

An Android transformation library providing a variety of image transformations for Coil, Glide, Picasso, and Fresco.
An Android transformation library providing a variety of image transformations for Coil, Glide, Picasso, and Fresco.

An Android transformation library providing a variety of image transformations for Coil, Glide, Picasso, and Fresco.

🎨 Modern image loading library for Android. Simple by design, powerful under the hood.
🎨 Modern image loading library for Android. Simple by design, powerful under the hood.

Simple Image Loader Modern image loading library for Android. Simple by design, powerful under the hood. Kotlin: Simple Image Loader is Kotlin-native

Comments
  • On implementiation

    On implementiation

    Android resource compilation failed Output: C:\Users\ROXIN'X-THINKSPACE\AndroidStudioProjects\Clinic\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:1458: error: duplicate value for resource 'attr/cornerRadius' with config ''. C:\Users\ROXIN'X-THINKSPACE\AndroidStudioProjects\Clinic\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml:1458: error: resource previously defined here.

    Command: C:\Users\ROXIN'X-THINKSPACE.gradle\caches\transforms-1\files-1.1\aapt2-3.2.1-4818971-windows.jar\ce423f3549b05ab79b42c1766eeaee7e\aapt2-3.2.1-4818971-windows\aapt2.exe compile --legacy
    -o
    C:\Users\ROXIN'X-THINKSPACE\AndroidStudioProjects\Clinic\app\build\intermediates\res\merged\debug
    C:\Users\ROXIN'X-THINKSPACE\AndroidStudioProjects\Clinic\app\build\intermediates\incremental\mergeDebugResources\merged.dir\values\values.xml Daemon: AAPT2 aapt2-3.2.1-4818971-windows Daemon #0

    opened by Roxin92 2
Releases(0.3.0)
Owner
Dushyant Mainwal
If it ain't tough, it ain't worth doing.
Dushyant Mainwal
Crop and Rounded Corners added to an ImageView.

SuperImageView Extra features for your ImageView provided in a modularized way Documentation for v2 coming this week. CropImageView An ImageView that

César Díez Sánchez 658 Dec 1, 2022
Add curve at bottom of image views and relative layouts.

Crescento Android library that adds a curve at the below of image views and relative layouts. CrescentoImageView and CrescentoContainer are the image

Shivam Satija 1.3k Nov 18, 2022
Add curve at bottom of image views and relative layouts.

Crescento Android library that adds a curve at the below of image views and relative layouts. CrescentoImageView and CrescentoContainer are the image

Shivam Satija 1.3k Mar 24, 2021
This is an Image slider with swipes, Here we used Volley to Image load URL's from JSON! Here we make it very easy way to load images from Internet and We customized the description font style(OpenSans).

ImageSliderWithSwipes This is an Image slider with swipes, Here we used Volley to load URL's from JSON! Here we make it very easy way to load images f

Prabhakar Thota 44 May 31, 2021
Pixel Boom is a Java-based Android software, featuring image super-resolution and colorization

Pixel Boom is a Java-based Android software, featuring image super-resolution and colorization.

Zaitian 1 Jul 3, 2022
An android image compression library.

Compressor Compressor is a lightweight and powerful android image compression library. Compressor will allow you to compress large photos into smaller

Zetra 6.7k Dec 31, 2022
A simple image cropping library for Android.

SimpleCropView The SimpleCropView is an image cropping library for Android. It simplifies your code for cropping image and provides an easily customiz

Issei Aoki 2.5k Dec 28, 2022
Customizable Android full screen image viewer for Fresco library supporting "pinch to zoom" and "swipe to dismiss" gestures. Made by Stfalcon

This project is no longer supported. If you're able to switch from Fresco to any other library that works with the Android's ImageView, please migrate

Stfalcon LLC 1.8k Dec 19, 2022
Dali is an image blur library for Android. It contains several modules for static blurring, live blurring and animations.

Dali Dali is an image blur library for Android. It is easy to use, fast and extensible. Dali contains several modules for either static blurring, live

Patrick Favre-Bulle 1k Dec 1, 2022
A small customizable library useful to handle an gallery image pick action built-in your app. :sunrise_over_mountains::stars:

Louvre A small customizable image picker. Useful to handle an gallery image pick action built-in your app. *Images from Google Image Search Installati

André Mion 640 Nov 19, 2022