-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDrawOrder.java
More file actions
46 lines (38 loc) · 1.04 KB
/
DrawOrder.java
File metadata and controls
46 lines (38 loc) · 1.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package com.work.basic;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.support.annotation.Nullable;
import android.util.AttributeSet;
import android.view.View;
/**
* Title: DrawOrder
* <p>
* Description:绘制顺序 https://hencoder.com/ui-1-5/
* </p>
*
* @author Changbao
* @date 2019/1/3 11:54
*/
public class DrawOrder extends View {
public DrawOrder(Context context) {
this(context, null);
}
public DrawOrder(Context context, @Nullable AttributeSet attrs) {
this(context, attrs, 0);
}
public DrawOrder(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
}
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
}
@Override
public void draw(Canvas canvas) {
super.draw(canvas);
Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);
paint.setTextSize(50);
canvas.drawText("绘制顺序", 40, 40, paint);
}
}