CircleView
CircleView copied to clipboard
Add shadow with offset
Is it possible to add a shadow with a customizable offset, instead of a homogeneous shadow centered in the center of the CircleView?
I tried defining a drawable as background, but it didn't work at all:
<com.github.pavlospt.CircleView
...
android:layout_width="192dp"
android:layout_height="192dp"
android:background="@drawable/circle_shadow"
...
/>
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item
android:bottom="0dp"
android:left="192dp"
android:right="0dp"
android:top="192dp">
<shape android:shape="oval">
<solid android:color="#bdbdbd" />
</shape>
</item>
</layer-list>
Hello, having a drawable as background didn't work because you would need to draw that in Canvas since this is a custom View component. Currently, I do not have the time to develop that feature. PRs are always welcome :)
Thanks for the quick response.
Do you have any general guide to develop it? I'll try to make it work and, if successful, I'll make a PR.
Well, I haven't really dived that much into custom Views, so i am afraid that I can not provide a guide :/