Skip to content

Repository files navigation

ReflectTextView

带倒影效果的TextView

演示:

demo show

使用:

前提条件

项目中需要引用 com.android.support:appcompat-v7 包才能使用本控件。

Project build.gradle配置
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Module build.gradel配置
dependencies {
implementation 'com.github.Dean1990:ReflectTextView:-SNAPSHOT'
}
布局
<com.deanlib.reflecttextview.ReflectTextView
android:layout_width="wrap_content"android:lineSpacingMultiplier="1.3"android:layout_height="wrap_content"reflect:spacingValue="5dp"reflect:reflectAlpha="120"reflect:reflectHeightMultiple="0.8"android:text="Reflect TextView 带倒影文本"android:textColor="#FF0000"android:textSize="20sp"
/>
布局文件可设置参数说明:
参数名说明默认值
reflect:spacingValue实体文字与倒影之间的空隙0dp
reflect:reflectAlpha倒影透明度100,取值范围 [1-255]
reflect:reflectHeightMultiple倒影的高度倍数1f,取值范围 [0-1f]

Demo:

https://github.com/Dean1990/LibDemo

About

带倒影效果的TextView

Resources

Stars

7 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors

Languages