在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:TextButton开源软件地址:https://gitee.com/duanhong169/TextButton开源软件介绍:Text ButtonAn easy to use Gradledependencies { implementation 'com.github.duanhong169:text-button:${latestVersion}' ...}
UsageUse the built-in effectsConfig <top.defaults.view.TextButton android:id="@+id/button3" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="animateTextColor" android:padding="4dp" android:textSize="16sp" app:defaultTextColor="@android:color/holo_blue_dark" app:pressedTextColor="@android:color/holo_orange_dark" app:disabledTextColor="@android:color/darker_gray" app:underline="true" app:effectDuration="200" app:textEffect="animateColor" app:backgroundEffect="ripple"/> There are 4 text effects: See Implement your own effectbutton5.setEffect(new TextButtonEffect() { private TextButton textButton; @Override public void init(TextButton textButton) { this.textButton = textButton; } @Override public void actionDown() { textButton.setAlpha(0.5f); } @Override public void actionUp() { textButton.setAlpha(1); }}); For more details, see the sample app. LicenseSee the LICENSE file. |
请发表评论