或者手动加QQ群:688433795
lygttpod / androidcustomview Goto Github PK
View Code? Open in Web Editor NEW带你在实战中学习自定义view,通过几个完整的例子带你走进自定义View的美妙世界
带你在实战中学习自定义view,通过几个完整的例子带你走进自定义View的美妙世界
或者手动加QQ群:688433795
textview自带append方法;
//直接用这个貌似更好点
append(arr[index]);
// stringBuffer.append(arr[index]);
currentIndex = index;
//所有文字都显示完成之后进度回调结束动画
if (currentIndex == (textCount - 1))
{
if (textAnimationListener != null)
{
textAnimationListener.animationFinish();
}
}
//新思路的做法
// setText(stringBuffer.toString());
/**
* 之前的做法刷新重绘text,需要自己控制文字的绘制,
* 看到网友的评论开拓了思路,既然是直接集成TextView
* 就可以直接使用setText()方法进行设置值了
*/
//invalidate();老思路的做法
滑动右侧字母左侧数据项不会切换到这个字母下面,偶尔会成功
当设备的cpu不是特别好,获取cpu比较忙的时,修改显示的duration果断,会有字不显示的问题。
我想让气泡文本框一直跟随进度走如何实现呢,我试了一下,好像跟随进度只能设置一次,如果想一直跟随进度的话就会有问题
控件宽度入设置wrap_content的话那么就看不见输入框了
<com.demoapplication.view.PayPsdInputView
android:id="@+id/editText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="8dp"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:inputType="number"
app:maxCount="6"
app:psdType="weChat"
app:rectAngle="5dp"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/titile" />
您好,
看了你写的这个受益颇多,自己动手写了一遍,有点疑惑的地方,就是在绘制文本的时候,cancas.drawText(string,int,int,paint)时,传入的第三个参数时,其int end的值为啥要除以2,而且除以其他数字的值都不可以!
烦请答疑解惑!谢谢
java.lang.NoSuchMethodError: android.animation.ValueAnimator.pause
at com.allen.androidcustomview.widget.WaveViewByBezier.pauseAnimation(WaveViewByBezier.java:190)
at com.allen.androidcustomview.WaveByBezierActivity.onPause(WaveByBezierActivity.java:28)
at android.app.Activity.performPause(Activity.java:5206)
at android.app.Instrumentation.callActivityOnPause(Instrumentation.java:1226)
at android.app.ActivityThread.performPauseActivity(ActivityThread.java:3002)
at android.app.ActivityThread.performPauseActivity(ActivityThread.java:2971)
at android.app.ActivityThread.handlePauseActivity(ActivityThread.java:2949)
at android.app.ActivityThread.access$800(ActivityThread.java:141)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1251)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:5041)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
at dalvik.system.NativeStart.main(Native Method)
05-04 21:04:49.805 1900-1900/com.allen.androidcustomview I/Process: Sending signal. PID: 1900 SIG: 9
背景的圆角矩形,如果按照现有代码绘制,圆角矩形的线宽只是设定值的一半,
rectF.set(0,0,width,height);应改为
rectF.set(borderLineWidth * 1f / 2, borderLineWidth * 1f / 2, width - borderLineWidth * 1f / 2, height - borderLineWidth * 1f / 2);
borderLineWidth为圆角矩形线宽值
首先表示东西都很不错!
然后我有个问题,长条进度条中,底部左右2边的边角设置圆角,在哪里设置
矩形变圆角和两圆向中靠拢是同时进行的。
自定义progressBar不能拖动吗,想要上面的效果,但是不能拖动呢
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.