PathEffectTextView Update

来源:互联网 发布:java 类似于枚举 编辑:程序博客网 时间:2024/05/21 17:12

添加了字体大小 颜色 字重(bold) 阴影 等设置项.

  • 更新了下Demo.

  • 做了几个新的Demo Gif

  • 发布到Jcenter

TODO:

  • 等有空的时候,添加各种笔刷.

Screenshot

Please waiting for loading the gif…

How to use

Step 1: add denpendence

compile('com.dk.view.patheffect:Library:0.1.1@aar')

If you are still using Eclipse, you can just copy source code or jar file to you project.

Step 2: add view to your layout:

<com.dk.view.patheffect.PathTextView    android:id="@+id/path"    android:layout_width="wrap_content"    android:layout_height="wrap_content"/>

step 3: call init method like this:

PathTextView mPathTextView = (PathTextView) findViewById(R.id.path);mPathTextView.init("Hello World");

Option settings:

mPathTextView.setPaintType(PathTextView.Type.MULTIPLY);mPathTextView.setTextColor(color);mPathTextView.setTextSize(size);mPathTextView.setTextWeight(weight);mPathTextView.setDuration(duration);mPathTextView.setShadow(radius, dx, dy, shadowColor);
0 0
原创粉丝点击