We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c506292 commit 990290bCopy full SHA for 990290b
Android/Android基础.md
@@ -1675,4 +1675,25 @@ Fragment 可见状态改变时会被调用setUserVisibleHint()方法,可以通
1675
1676
1677
1678
-### 119 如何画五子棋棋谱?
+### 119 如何画五子棋棋谱?
1679
+
1680
1681
1682
+#### 120 自定义 view(自定义view的时候,三个构造函数各自的作用)
1683
1684
+```java
1685
+//在java代码创建视图的时候被调用,如果是从xml填充的视图,就不会调用这个
1686
+public RoundProgressBar(Context context) {
1687
+ this(context, null);
1688
+ }
1689
1690
+//在xml创建但是没有指定style的时候被调用
1691
+public RoundProgressBar(Context context, AttributeSet attrs) {
1692
+ this(context, attrs, 0);
1693
+}
1694
1695
+public RoundProgressBar(Context context, AttributeSet attrs, int defStyle) {}
1696
+```
1697
1698
1699
0 commit comments