What is the correct way to install the Carbon library for Android?

Viewed 930

Clone the Carbon library repository for use in an android project:

https://github.com/ZieIony/Carbon

Install the dependency on my gradle:

api 'tk.zielony:carbon:0.16.0.1'

Also add other settings:

 compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8
    }

But at the moment of implementing the shadow effect it is not displayed in my project; the only thing is a black shadow as if it were a normal cardview and not a shadow with a custom color:

    <carbon.widget.Button
        android:layout_width="56dp"
        android:layout_height="56dp"
        android:layout_margin="@dimen/carbon_padding"
        android:background="#ffffff"
        app:carbon_cornerRadius="28dp"
        app:carbon_elevation="8dp"
        app:carbon_elevationShadowColor="@color/carbon_blue_700" />

And how it looks already compiled

enter image description here

As it should look

enter image description here

What am I doing wrong?

Thanks!

1 Answers

using carbon.widget.LinearLayoutworked for me

<carbon.widget.LinearLayout
  android:layout_width="56dp"
  android:layout_height="56dp"
  android:layout_margin="@dimen/carbon_padding"
  android:background="#ffffff"
  app:carbon_cornerRadius="28dp"
  app:carbon_elevation="8dp"
  app:carbon_elevationShadowColor="@color/carbon_blue_700"
  />
Related