質問編集履歴
2
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -100,13 +100,13 @@
|
|
100
100
|
|
101
101
|
```Java
|
102
102
|
|
103
|
-
public class Cust
|
103
|
+
public class Custom extends ViewGroup {
|
104
104
|
|
105
|
-
public
|
105
|
+
public Custom(Context context, AttributeSet attrs) {
|
106
106
|
|
107
107
|
super(context, attrs);
|
108
108
|
|
109
|
-
inflate(context,R.layout.custum,
|
109
|
+
inflate(context,R.layout.custum,this);
|
110
110
|
|
111
111
|
}
|
112
112
|
|
1
追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -93,3 +93,25 @@
|
|
93
93
|
</LinearLayout>
|
94
94
|
|
95
95
|
```
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
(追記)
|
100
|
+
|
101
|
+
```Java
|
102
|
+
|
103
|
+
public class Custum extends View {
|
104
|
+
|
105
|
+
public Tile(Context context, AttributeSet attrs) {
|
106
|
+
|
107
|
+
super(context, attrs);
|
108
|
+
|
109
|
+
inflate(context,R.layout.custum,(ViewGroup)getParent());
|
110
|
+
|
111
|
+
}
|
112
|
+
|
113
|
+
}
|
114
|
+
|
115
|
+
|
116
|
+
|
117
|
+
```
|