• Stars
    star
    324
  • Rank 129,708 (Top 3 %)
  • Language
    Java
  • Created over 6 years ago
  • Updated over 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A library to add shadows for the Android View.(一个方便为Android View添加自然的阴影的库)

ShadowHelper

A library to add shadows for the Android View.(一个方便为Android View添加自然的阴影的库)

demo.gif

How to use

1.Step 1: Add the JitPack repository to your build file

allprojects {
		repositories {
			...
			maven { url 'https://jitpack.io' }
		}
	}

2.Step 2: Add the dependency

dependencies {
	        compile 'com.github.zhengcx:ShadowHelper:v1.0'
	}

3.Step 3: Use in Java code like this:

 TextView textView1 = findViewById(R.id.tv_1);
 ShadowConfig.Builder config = new ShadowConfig.Builder()
                .setColor(mColor[0])//View颜色
                .setShadowColor(mShadowColor)//阴影颜色
                .setGradientColorArray(mColor)//如果View是渐变色,则设置color数组
                .setRadius(mRadius)//圆角
                .setOffsetX(mOffsetX)//横向偏移
                .setOffsetY(mOffsetY);//纵向偏移

ShadowHelper.setShadowBgForView(textView1, config);

End 欢迎Star/Fork/Issue.

License

Apache2.0.

About Me

More Repositories

1

MethodTraceMan

用于快速找到高耗时方法,定位解决Android App卡顿问题。通过gradle plugin+ASM实现可配置范围的方法插桩来统计所有方法的耗时,并提供友好的界面展示,支持耗时筛选、线程筛选、方法名筛选等。(A Tool for Discovering High Time-consuming Methods for Android App)
Kotlin
1,637
star
2

RNIconfont

演示如何在RN中使用自定义的ttf文件来展示icon,并提供生成iconfont映射文件的脚本.(A demo that demonstrates how to use custom ttf file in the ReactNtive to display an icon, and provide a script to generate an iconfont map file.)
Objective-C
47
star
3

InstantRecyclerView

A library that helps to implement a complex list with RecyclerView.(RecyclerView使用的封装与优化,帮助你快速利用RecyclerView构建复杂列表)
Java
22
star
4

LineWrapContainer

A custom line wrap layout ,support set max lines.(自定义流式布局,支持设置最大行数)
Java
10
star
5

HorizontalDragMoreView

A horizontal drag to load more custom Layouts with damped rebounds.(一个横向拖动加载更多带阻尼回弹的自定义Layout)
Java
8
star
6

CustomStickyLiveData

Customize a LiveData that controls whether you need sticky.Default is not sticky.(一个可以控制是否需要粘性的LiveData,具备LiveData优点的基础上解决LiveData自带粘性的问题)
Java
7
star
7

testSubmduleMain

main peoject
1
star
8

testSubModuleLib1

submodule lib1
1
star
9

RNIntegrationDemo

a Android native project integration ReactNative
Java
1
star
10

RNCookAssistant

A practice project in full use of ReacNative.The main theme is cooking. (一个完全使用ReactNative的日常练手项目,附带项目GIF预览图)
JavaScript
1
star