ShadowViewHelper
- https://github.com/wangjiegulu/ShadowViewHelper
- Java
- 100
- 2025-04-01T06:36:03Z
- 241
- 775
- 29
- 142
Shadow layout, shadow view for android.
介绍:
为View添加阴影效果的工具类。
运行效果:
使用说明:
xml:
<LinearLayout
android:id="@+id/activity_main_shadow_view_b"
android:layout_width="wrap_content" android:layout_height="wrap_content"
android:layout_gravity="center"
android:layout_marginTop="32dp"
android:orientation="vertical"
android:gravity="center"
android:padding="8dp"
>
<ImageView android:layout_width="match_parent" android:layout_height="match_parent"
android:src="@mipmap/ic_launcher"
/>
<TextView android:layout_width="match_parent" android:layout_height="match_parent"
android:gravity="center"
android:text="Shadow View with LinearLayout"
android:textSize="15sp"
/>
</LinearLayout>
Activity:
ShadowViewHelper.bindShadowHelper(
new ShadowProperty()
.setShadowColor(0x77000000)
.setShadowDy(ABTextUtil.dip2px(context, 0.5f))
.setShadowRadius(ABTextUtil.dip2px(context, 3))
, findViewById(R.id.activity_main_shadow_view_b));
发表评论
已下载
0