REQUEST Settings Cardview Shadow ?

blackestflag

Well-known member
Joined
Oct 19, 2022
Messages
498
Awards
4
Offline
Hey guys, just trying to cleanup some yuckiness from a Smarters v4 Settings page

Not sure where this shadow and nasty square box is coming from in the background, around my boxes, but it's driving me nuts
I've tried to change the elevation on the androidx.cardview.widget.CardView line, but that just makes things worse

Any ideas ?
I can supply the xml's if that helps any

I'm certain some of you have dealt with this before, so any advice is appreciated

Photos for reference


1711818640932.png
 

Attachments

  • cardview elevation shadow .png
    cardview elevation shadow .png
    298.7 KB · Views: 15

blackestflag

Well-known member
Joined
Oct 19, 2022
Messages
498
Awards
4
Offline
I sorted it out

BEFORE the activity_settings_tv.xml cardView entry was
Code:
<androidx.cardview.widget.CardView
                            android:id="@id/rl_general_settings_card"
                            android:tag="11"
                            android:focusable="true"
                            android:focusableInTouchMode="true"
                            android:layout_width="0.0dip"
                            android:layout_height="160.0sp"
                            android:layout_weight="1.0"
                            app1:cardBackgroundColor="@android:color/transparent"
                            app1:cardCornerRadius="1.0dip"
                            app1:cardElevation="10.0dip"
                            app1:cardUseCompatPadding="true">

AFTER
Code:
<androidx.cardview.widget.CardView
                            android:id="@id/rl_general_settings_card"
                            android:layout_width="0.0dip"
                            android:layout_height="135.0sp"
                            android:layout_weight="1.0"
                            android:layout_gravity="center_vertical"
                            android:focusable="true"
                            android:focusableInTouchMode="true"
                            android:tag="11"
                            app1:cardBackgroundColor="@android:color/transparent"
                            app1:cardCornerRadius="0dp"
                            app1:cardElevation="0dp"
                            app1:cardUseCompatPadding="true">

I had to reduce the layout_height and add layout_gravity="center_vertical" for it to be close to how I like
Also it was key to set the cornerRadius to 0dp, same with cardElevation 0dp

I hope someone else finds this helpful, I know it sure bugged the shit outta me

1711824146186.png
 
Top