akashjaindev / ImageLetterIcon

Material letter icon with circle background. Also supports for image for user contact.
Apache License 2.0
213 stars 50 forks source link

Questions: image inside, outline, elevation, rounded corners ? #4

Closed AndroidDeveloperLB closed 7 years ago

AndroidDeveloperLB commented 7 years ago
  1. Is it possible to put an image inside the MaterialLetterIcon , that won't be shaped, meaning show as it is? This is useful in cases that there are no letters or images available for the item. Can also be useful for the case of loading the image, yet not having any letter to show during this time.

  2. Is it possible to add a border (AKA outline/stroke) around the shape, including color and width?

  3. Is it possible to add elevation to the MaterialLetterIcon ? I know that it's possible to add a rounded one using this:

    public static void setOvalElevationToView(final View view) {
        if (android.os.Build.VERSION.SDK_INT >= android.os.Build.VERSION_CODES.LOLLIPOP)
            view.setOutlineProvider(new ViewOutlineProvider() {
                @TargetApi(VERSION_CODES.LOLLIPOP)
                @Override
                public void getOutline(View view, Outline outline) {
                    final int size = view.getWidth();
                    outline.setOval(0, 0, size, size);
                }
            });
    }

But it's only from Lollipop, and only for rounded ones

  1. Is it possible to use rounded corners, instead of only square/circle shapes?
akashjaindev commented 7 years ago

yes you can make customization. i have already uploaded source code for library

AndroidDeveloperLB commented 7 years ago

You mean changing the code of the library? I meant if it supports those things.

AndroidDeveloperLB commented 7 years ago

It's just that for mimicking the contacts app, I also have to handle the case that the item doesn't have a letter to show and also not an image:

device-2017-02-26-130342