Tunous / SwipeActionView

Android swipe-able view, which allows users to perform actions with swipe gestures.
Apache License 2.0
196 stars 16 forks source link

CardView is not showing a shadow #6

Closed Perfomer closed 7 years ago

Perfomer commented 7 years ago

Attribute "cardElevation" doesn't work, when CardView is wrapped in SwipeActionView.

Tunous commented 7 years ago

Did you try setting the sav_alwaysDrawBackground attribute to true?

Perfomer commented 7 years ago

Yes, I did. There is an XML code example.

<me.thanel.swipeactionview.SwipeActionView
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    app:sav_alwaysDrawBackground="true"  >

    <ImageView
        android:layout_width="24dp"
        android:layout_height="24dp"
        android:layout_gravity="end|center_vertical"
        android:src="@mipmap/ic_launcher" />

    <android.support.v7.widget.CardView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        app:cardElevation="10dp"
        app:cardCornerRadius="4dp" />

</me.thanel.swipeactionview.SwipeActionView>
Tunous commented 7 years ago

@Perfomer Should be fixed in #7, can you test it?

the-maux commented 7 years ago

Is there a way to draw elevation on cardView with 1.0.1 version ?

Tunous commented 7 years ago

I've released 1.1.0 which should fix this issue. Is there any reason to not update?

the-maux commented 7 years ago

Yea i can't suceed to build with the appcompat-v7:25.3.0 wich is required by the 1.1.0 version

Tunous commented 7 years ago

I see. You can always edit this dependency and compile the library manually.

the-maux commented 7 years ago

I need to play more with it, but great job btw !

Tunous commented 7 years ago

Thank you!

androidqasim commented 6 years ago

If your manifest file has a android:hardwareAccelerated="false" line, delete it.

sairam482 commented 6 years ago

Thanks you androidqasim it worked for me

androidqasim commented 6 years ago

Welcome

On Tue, Jun 5, 2018 at 5:46 PM, sairam482 notifications@github.com wrote:

Thanks you androidqasim it worked for me

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Tunous/SwipeActionView/issues/6#issuecomment-394695576, or mute the thread https://github.com/notifications/unsubscribe-auth/AYi2PLUExD1pFSIrjO6jIFuM-QsIf-7Iks5t5n2agaJpZM4Mh1iQ .

-- https://about.me/android.dev?promo=email_sig&utm_source=product&utm_medium=email_sig&utm_campaign=gmail_api&utm_content=thumb Muhammad Qasim about.me/android.dev https://about.me/android.dev?promo=email_sig&utm_source=product&utm_medium=email_sig&utm_campaign=gmail_api&utm_content=thumb

the-maux commented 6 years ago

Just for information, the hardwareAccelerated was not set