Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Dean1990/ReflectTextView

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

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

Packages

 
 
 

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.