LongShadow

  • 视图效果 (View Effects)
  • ★★★★★
  • 2017-10-28 10:58
  • 641 kb
  • Android Studio

介绍:

为任意view添加长阴影

运行效果:

使用说明:

依赖

dependencies {
    compile 'com.github.florent37:longshadow:(lastversion)'
}

使用

<com.github.florent37.longshadow.LongShadow
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:id="@+id/shadow"
        app:shadow_angle="60"
        app:shadow_color="#739440"
        android:background="#99ca55">

        <TextView
            android:id="@+id/logo"
            android:layout_width="wrap_content"
            android:layout_height="120dp"
            android:gravity="center"
            android:textColor="#FFF"
            android:textSize="30sp"
            android:layout_gravity="center"
            android:text="hello world!" />

    </com.github.florent37.longshadow.LongShadow>