
自定义view
文章平均质量分 73
橘子先生z
这个作者很懒,什么都没留下…
展开
-
Android圆角和阴影
1.圆角其实圆角有两种(1)背景这种一般是通过shape来实现<?xml version="1.0" encoding="utf-8"?><shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <solid android:color="#80FFFFFF" /> <size andr原创 2022-05-18 11:57:52 · 1999 阅读 · 0 评论 -
自定义View遇到的问题-——drawText局中详解
1.这就是最常用的绘制文字public void drawText(@NonNull String text, float x, float y, @NonNull Paint paint) { super.drawText(text, x, y, paint); }1.第一个参数就是你要绘制的文字2.绘制开始的X坐标(这也是我为什么发这篇文章的理由,所以要多尝试,理解其中是如何设计的) private var buttonBgPaint = Paint() button原创 2022-03-27 16:42:32 · 405 阅读 · 0 评论