ShapeOfView icon indicating copy to clipboard operation
ShapeOfView copied to clipboard

Elevation not working

Open iMJ007 opened this issue 5 years ago • 5 comments

The elevation on any of the view is not working. no matter if height/wifth is set to wrap_content or match_parent or a specific size. It just shows small box of shadow on top left of the view when trying to set elevation.

Here is the image as shown in android studio preview.

error

The elevation shadow is completely invisible when run on device.

iMJ007 avatar Nov 25 '18 07:11 iMJ007

elevation often displays on view's margin

and you should use "clipToPadding=false"

Le dim. 25 nov. 2018 à 08:21, Mohammed Junaid [email protected] a écrit :

The elevation on any of the view is not working. no matter if height/wifth is set to wrap_content or match_parent or a specific size. It just shows small box of shadow on top left of the view when trying to set elevation.

Here is the image as shown in android studio preview.

[image: error] https://user-images.githubusercontent.com/20738000/48976639-a18bbc80-f0b0-11e8-9dd3-bc93738d692a.png

The elevation shadow is completely invisible when run on device.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/florent37/ShapeOfView/issues/41, or mute the thread https://github.com/notifications/unsubscribe-auth/AFfQXBG0YbVELNiNbMZpQw7XjOfAunRIks5uykTpgaJpZM4YxwH2 .

florent37 avatar Nov 25 '18 09:11 florent37

elevation often displays on view's margin and you should use "clipToPadding=false" Le dim. 25 nov. 2018 à 08:21, Mohammed Junaid [email protected] a écrit : The elevation on any of the view is not working. no matter if height/wifth is set to wrap_content or match_parent or a specific size. It just shows small box of shadow on top left of the view when trying to set elevation. Here is the image as shown in android studio preview. [image: error] https://user-images.githubusercontent.com/20738000/48976639-a18bbc80-f0b0-11e8-9dd3-bc93738d692a.png The elevation shadow is completely invisible when run on device. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#41>, or mute the thread https://github.com/notifications/unsubscribe-auth/AFfQXBG0YbVELNiNbMZpQw7XjOfAunRIks5uykTpgaJpZM4YxwH2 .

I even used clipToPadding="false" but still it shows just that small square on top and not a proper shadow and the issue is with all all shapes bubble, triangle, roundedSquare..

here's the xml code of my view


<com.github.florent37.shapeofview.shapes.BubbleView
            android:id="@+id/color_palette_container"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:visibility="visible"
            android:elevation="12dp"
            android:layout_below="@id/current_color_container"
            android:layout_alignStart="@id/current_color_container"
            android:layout_marginStart="-48dp"
            android:layout_marginTop="4dp"
            android:clipToPadding="false"
            app:shape_bubble_arrowPosition="top"
            app:shape_bubble_borderRadius="16dp">

            <GridLayout
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:background="#FFFFFF"
                android:columnCount="2"
                android:elevation="8dp"
                android:padding="16dp">

iMJ007 avatar Nov 25 '18 09:11 iMJ007

which version are you using ?

florent37 avatar Nov 26 '18 08:11 florent37

can you try adding layout_marginBottom & layout_marginRight on your layout please ?

florent37 avatar Nov 26 '18 08:11 florent37

I am using 1.4.6

I tried layout_marginBottom & layout_marginRight but it still gives the same issue.

iMJ007 avatar Nov 27 '18 05:11 iMJ007