• Stars
    star
    1,286
  • Rank 36,580 (Top 0.8 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created over 8 years ago
  • Updated over 4 years ago

Reviews

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

Repository Details

🔥 Android点赞+1效果,支持文本和图像

GoodView

API

Android点赞+1效果,支持文本和图像

ScreenShot

Usage

Gradle:
compile 'com.wx.goodview:goodview:1.0.0'

Demo

Java:
    public class MainActivity extends Activity {
        @Override
        protected void onCreate(Bundle savedInstanceState) {
            super.onCreate(savedInstanceState);
            setContentView(R.layout.activity_main)

            final GoodView goodView = new GoodView(this);
            Button button = new Button(this);
            button.setOnClickListener(new View.OnClickListener() {
                @Override
                public void onClick(View v) {
                    goodView.setText("+1");
                    goodView.show(v);
                }
            });

        }
    }
Methods:
method 方法 description 描述
void setText(String text) 设置文本(optional)
void setTextInfo(String text, int textColor, int textSize) 设置文本信息(optional)
void setImage(int resId) 设置图片(optional)
void setImage(Drawable drawable) 设置图片(optional)
void setDistance(int dis) 设置移动距离
void setTranslateY(int fromY, int toY) 设置Y轴移动属性
void setAlpha(float fromAlpha, float toAlpha) 设置透明度属性
void setDuration(int duration) 设置动画时长
void reset() 重置属性
void show(View v) 展示(required)

About

License

Copyright (C) 2016 [email protected]

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

More Repositories

1

BezierMaker

🔥 通过de Casteljau算法绘制贝塞尔曲线,并计算它的切线,实现1-7阶贝塞尔曲线的形成动画。
Java
1,408
star
2

WheelView

Android滚轮控件,基于ListView实现,可以自定义样式。
Java
1,021
star
3

decompile-apk

🔥 Decompile APK(反编译APK)
Shell
736
star
4

AndroidNote

🔥 Android 进阶笔记,包含常用的技术框架、博客社区、书籍等。
679
star
5

AppUninstall

Android App监听自身卸载,反馈统计
C++
497
star
6

AndroidCommon

🔥 一个简单的开源Android工具类库,提供许多常用的类帮助我们开发程序
Java
124
star
7

wechat-lightapp

微信小程序(应用号)开发工具+Demo+教程
JavaScript
118
star
8

CheckPasswordStrength

🔥 一个检测密码强度的Java工具库。
Java
60
star
9

RoundImageView

圆角图片控件,支持圆形边框和椭圆边框
Java
48
star
10

MultiWindow

Android N 多窗口支持
Java
47
star
11

gradle-bintray-upload

Upload Android Project's gradle script files used in Android Studio
31
star
12

TouchRegion

增大触摸点击区域
Java
12
star
13

apksig

the source code of apksig(Mirror Repo), keeping up-to-date with the official update.
Java
10
star
14

MVX

an Android MVC & MVP & MVVM demo
Java
3
star
15

json2model

This library generates a model object corresponding to a JSON string by executing commands in code
Dart
2
star
16

fork_repository_for_private

The public repositories provided by Github do not allow the creation of private branches, and the method of creating a private branch by copying the repository is documented here.
Shell
1
star