Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove drop shadow of an ImageView

In Android Studio I integrated an ImageView with an unwanted drop shadow, which I cant seem to get rid off. How do you make the picture blend in to the background? I tried setting the background of the button to transparent and android:shadowRadius="0" did not work.

My ImageView

My .xml file

<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:background="@color/colorWhiteText"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <android.support.constraint.Guideline
        android:id="@+id/guideline16"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="horizontal"
        app:layout_constraintGuide_percent="0.23" />

    <ImageView
        android:id="@+id/imageView"
        android:layout_width="100dp"
        android:layout_height="100dp"
        android:layout_marginBottom="8dp"
        android:layout_marginEnd="8dp"
        android:layout_marginStart="8dp"
        android:layout_marginTop="8dp"
        android:shadowRadius="0"
        app:layout_constraintBottom_toTopOf="@+id/guideline16"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:srcCompat="@drawable/logo_174" />

</android.support.constraint.ConstraintLayout>
like image 895
Lukas Köhl Avatar asked Mar 18 '18 18:03

Lukas Köhl


1 Answers

I just found my stupid solution to this question. Make sure the picture itself has no drop shadow, which somehow wasn't the case. I was sure I had the picture as I wanted it to have it but somehow in the process a drop shadow was created.

like image 137
Lukas Köhl Avatar answered Oct 06 '22 01:10

Lukas Köhl