0

Hello I´m trying to add shadows but I can´t find a way to get it done, I already tried app:borderWidth="0dp" and altering the Elevation/Translation of my views but Nothing worked out.

compileSdkVersion 27
    defaultConfig {
        minSdkVersion 24
        targetSdkVersion 27
        versionCode 1
        versionName "1.0"
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"

    <android.support.design.widget.FloatingActionButton
        android:id="@+id/fab"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_alignParentBottom="true"
        android:layout_alignParentEnd="true"
        android:layout_marginBottom="16dp"
        android:layout_marginEnd="16dp"
        app:backgroundTint="@color/colorPrimary"
        app:fabSize="normal"
        app:srcCompat="@drawable/add"
        app:borderWidth="0dp"/>

            <ImageButton
                android:id="@+id/ImageInput"
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:adjustViewBounds="true"
                android:background="@drawable/backgroundcombi"
                android:maxHeight="200dp"

                android:scaleType="fitCenter"
                app:srcCompat="@drawable/defaultimage"
                android:contentDescription="@string/picture" />

1 Answers1

0

I found the solution.

 android:hardwareAccelerated="false"

this line in my manifest was the reason that I had no shadows in the whole APP. I hope it may help others