Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

is there a way to add elevation and translationZ to single item ? #69

Open
1 task done
MohamedHelmy95 opened this issue Nov 3, 2021 · 2 comments
Open
1 task done

Comments

@MohamedHelmy95
Copy link

MohamedHelmy95 commented Nov 3, 2021

What kind of issue is this?

  • Question. If you want to ask how to do something, or to understand why something isn't
    working the way you expect it to.
Info:
  • PinView version: Latest
  • Device OS version: Android 9
  • Device Name: Xaiomi Note 5
Description:

I want to add a shadow effect around single item

What did I do:

I created my own style inheriting from your default style

<style name="MyPinView" parent="PinWidget.PinView">
<item name="android:elevation">4dp</item>
<item name="android:translationZ">4dp</item>
<item name="elevation">4dp</item>
</style>
but it's not working

@akankshapaul048
Copy link

I want the same effect in my app, Did you find a solution?

@MohamedHelmy95
Copy link
Author

Hello @akankshapaul048 the only way I got it working is by creating a MaterialShapeDrawable that draws the shape of the background I need and draws shadows also.
more info here : https://medium.com/ackee/create-beautiful-shapes-with-materialshapedrawable-874dd46e0fd5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants