Android library to display a few images in one ImageView like avatar of group chat. Made by Stfalcon

Overview

MultiImageView

codebeat badge

Library for display a few images in one MultiImageView like avatar of group chat

alt tag

Who we are

Need iOS and Android apps, MVP development or prototyping? Contact us via [email protected]. We develop software since 2009, and we're known experts in this field. Check out our portfolio and see more libraries from stfalcon-studio.

Download

  1. Add jitpack to the root build.gradle file of your project at the end of repositories.
allprojects {
  repositories {
    ...
    maven { url 'https://jitpack.io' }
  }
}
  1. Add the dependency
dependencies {
  ...
  implementation "com.github.stfalcon-studio:StfalconFixturer-android:[last_version]"
}  

Usage

Add MultiImageView to layout xml file

<com.stfalcon.multiimageview.MultiImageView
        android:id="@+id/iv"
        android:layout_width="100dp"
        android:layout_height="100dp"/>

In java class find view by id

final MultiImageView multiImageView = (MultiImageView) findViewById(R.id.iv);

For adding image to MultiImageView use method addImage(Bitmap bitmap). For exapple:

multiImageView.addImage(BitmapFactory.decodeResource(getResources(), R.drawable.avatar1));

For setting shape of MultiImageView use method setShape(MultiImageView.Shape shape).

multiImageView.setShape(MultiImageView.Shape.RECTANGLE);//Rectangle with round corners
multiImageView.setShape(MultiImageView.Shape.CIRCLE);//Circle
multiImageView.setShape(MultiImageView.Shape.NONE);//Without shape

If you choose rectangle shape you can set corner radius

multiImageView.setRectCorners(50);

To clear MultiImageView use:

multiImageView.clear();

Take a look at the sample project for more information

License

Copyright 2017 stfalcon.com

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
You might also like...
EtsyBlur is an Android library that allows developers to easily add a glass-like blur effect implemented in the  Etsy app.
EtsyBlur is an Android library that allows developers to easily add a glass-like blur effect implemented in the Etsy app.

EtsyBlur EtsyBlur is an Android library that allows developers to easily add a glass-like blur effect implemented in the past Etsy app. Try out the sa

Android Library To Create Button With Multi Reactions like Facebook or Linkedin
Android Library To Create Button With Multi Reactions like Facebook or Linkedin

ReactButton Android Library written in Java to Create ReactButton with Multi Reactions like Facebook or Linkedin 😎 Default Reactions 😄 Custom Reacti

A lightweight android library that allows to you create custom fast forward/rewind animations like on Netflix.
A lightweight android library that allows to you create custom fast forward/rewind animations like on Netflix.

SuperForwardView About A lightweight android library that allows to you create custom fast forward/rewind animations like on Netflix. GIF Design Credi

A Photo Editor library with simple, easy support for image editing using paints,text,filters,emoji and Sticker like stories.
A Photo Editor library with simple, easy support for image editing using paints,text,filters,emoji and Sticker like stories.

PhotoEditor A Photo Editor library with simple, easy support for image editing using Paints, Text, Filters, Emoji and Sticker like stories. Features D

PassCode is the Android app made by using Jetpack Compose. Created for the test task submission.
PassCode is the Android app made by using Jetpack Compose. Created for the test task submission.

PassCode PassCode is the Android app made by using the Jetpack Compose. Created for the test task submission. Showcase Dark Theme Light Theme ACs The

You can easily access the top of the screen in Android. Like a iPhone 6 & 6 Plus.
You can easily access the top of the screen in Android. Like a iPhone 6 & 6 Plus.

Reachability on Android Easy access on top. Like a iPhone 6 & 6 Plus. demo apk Usage Add dependencies compile 'com.github.sakebook:Reachability:0.2.0@

A lightweight indicator like in nexus 5 launcher
A lightweight indicator like in nexus 5 launcher

CircleIndicator A lightweight indicator like in nexus 5 launcher Gradle AndroidX dependencies { implementation 'me.relex:circleindicator:2.1.6' }

💳 A quick and easy flip view through which you can create views with two sides like credit cards, poker cards etc.
💳 A quick and easy flip view through which you can create views with two sides like credit cards, poker cards etc.

The article on how this library was created is now published. You can read it on this link here. →. 💳 EasyFlipView Built with ❤︎ by Wajahat Karim and

Customizable bounce animation for any view like in Clash Royale app
Customizable bounce animation for any view like in Clash Royale app

Bounceview-Android Customizable bounce animation for any view updation Getting Started In your build.gradle dependencies { implementation 'hari.bo

Comments
  • Equivalent of Bound for java -- trying to convert to java file??

    Equivalent of Bound for java -- trying to convert to java file??

    if (bitmaps.size() == 1) {
                    Bitmap bitmap = scaleCenterCrop(bitmaps.get(0), bounds.width(), bounds.height()); // bound ??
                    items.add(PhotoItem(bitmap, Rect(0, 0, bounds.width(), bounds.height())));
    

    Currently need to extend your library ,having an issue with the conversion to java -- can find where bound arise from , what equivalent can i use , thanks

    opened by madibalive 4
  • Cant able to add Multiple image urls from json response to adapter

    Cant able to add Multiple image urls from json response to adapter

    From Json response, I would like to add the 4 urls to multiimageview.

    I used the following code to store the urls in arraylist:

    details detail = new details();
    if(jRealObject1.has("updatesFileCount")) {
                                    String updatefilecount = jRealObject1.getString("updatesFileCount");
                                    int count = Integer.parseInt(updatefilecount);
                                    for (int k = 0; k < count; k++) {
                                        ls.add(jRealObject1.getString("updateFile"+k));
                                    }
                                    detail.setMultiimg(ls);
                                }
    

    Here details is class for getter and setter method for setMultiimg()

    And this is my adapter class:

    List<String> ls = new ArrayList<String>(data.get(position).getMultiimg());
           StringBuilder sb = new StringBuilder();
           for (String s : ls)
           {
               sb.append(s);
               sb.append("\t");
    
               myHolder.multiImageView.addImage(BitmapFactory.decodeResource(Resources.getSystem(), Integer.parseInt(sb.toString())));
           }
    

    By this the method, I used to call the value from my main activity. But I get null value.

    Kindly check the error in that coding. Or suggest me best solution to store to

    Waiting for your reply.

    opened by siprabin 2
  • White lines between the images ( not in a standard use case )

    White lines between the images ( not in a standard use case )

    Libs looks great! Thanks for sharing!

    I am trying to use it as the largeIcon of a notification but the end result is big while ( actually alpha ) lines between the images :

    example

    In order to extract the bitmap from the MultiImageView i've did the following incantation :

    
    LayoutInflater inflater = (LayoutInflater) this.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    
                View wrapperView = inflater.inflate(R.layout.multi_image_view, null);
    
                MultiImageView imageView = wrapperView.findViewById(R.id.multi_image_view);
    
                for (Bitmap cachedIcon : cachedIcons)
                {
                    imageView.addImage(cachedIcon);
                }
    
                imageView.setShape(MultiImageView.Shape.CIRCLE);
    
                wrapperView.measure(View.MeasureSpec.UNSPECIFIED, View.MeasureSpec.UNSPECIFIED);
                wrapperView.layout(0, 0, wrapperView.getMeasuredWidth(), wrapperView.getMeasuredHeight());
                wrapperView.buildDrawingCache();
    
                Bitmap bitmap =
                        Bitmap.createBitmap(wrapperView.getMeasuredWidth(), wrapperView.getMeasuredHeight(),
                                Bitmap.Config.ARGB_8888);
    
                Canvas canvas = new Canvas(bitmap);
                wrapperView.draw(canvas);
    
                return bitmap;
    

    And the R.layout.multi_image_view looks like

    <?xml version="1.0" encoding="utf-8"?>
    
    <FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content">
    
    
        <com.stfalcon.multiimageview.MultiImageView
            android:id="@+id/multi_image_view"
            android:layout_width="72dp"
            android:layout_height="72dp" />
    
    </FrameLayout>
    

    If a possible cause passes trough your mind, I will be very happy if you share it .

    Cheers!

    opened by bobymicroby 17
Releases(0.1)
Owner
Stfalcon LLC
We specialize in the development of large and medium-sized projects, mobile and web applications, portals with a complex and rich functionality.
Stfalcon LLC
Android Country Picker is a Kotlin-first, flexible and powerful Android library that allows to integrate Country Picker with just a few lines.

1. Add dependency dependencies { implementation 'com.hbb20:android-country-picker:X.Y.Z' } For latest version, 2. Decide your use-case

Harsh B. Bhakta 65 Dec 6, 2022
Group of libraries to help you build better animations with Jetpack Compose

Group of libraries to help you build better animations with Jetpack Compose

null 36 May 12, 2022
A library support circular imageview with rotation animation

Circular Imageview with Rotate Animation This is a fast and efficient open source custom imageview for Android that allow to easy implement disc anima

Nhien Nguyen 5 Jul 24, 2022
Postman is a reactive One-tap SMS verification library. This library allows the usage of RxJava with The SMS User Consent API

What is Postman? Postman is a reactive One-tap SMS verification library. This library allows the usage of RxJava with The SMS User Consent API Usage P

Cafer Mert Ceyhan 129 Dec 24, 2022
Library project to display DialogFragment with a blur effect.

BlurDialogFragment This project allows to display DialogFragment with a burring effect behind. The blurring part is achieved through FastBlur algorith

tvbarthel 2.1k Dec 29, 2022
🎨 Android colorpicker for getting colors from any images by tapping on the desired color.

ColorPickerView ?? ColorPickerView implements getting HSV colors, ARGB values, Hex color codes from any image drawables or your gallery pictures by ta

Jaewoong Eum 1.3k Jan 8, 2023
Android loading animation with images changing

Android loading animation with images changing

Cüneyt Çarıkçi 109 Nov 29, 2022
Android GraphView is used to display data in graph structures.

GraphView Android GraphView is used to display data in graph structures. Overview The library is designed to support different graph layouts and curre

null 991 Dec 30, 2022
Thirty-one different easing animation interpolators for Android.

EasingInterpolator Thirty-one different easing animation interpolators for Android. It does not use the standard 4 param ease signature. Instead it us

Masayuki Suda 1.1k Dec 28, 2022
A customised EditText view serving the purpose of taking numeric One Time Password from a user. With stunning animation, and high customizability.

PassCodeText A customised EditText view serving the purpose of taking numeric One Time Password from a user. With stunning animation, and high customi

Swapnil Tiwari 107 Nov 16, 2022