質問編集履歴
4
余計なものを削除
test
CHANGED
File without changes
|
test
CHANGED
@@ -7,20 +7,6 @@
|
|
7
7
|
動的にチェックボックスを追加したいのですが、どうすればいいのでしょうか?
|
8
8
|
|
9
9
|
```java
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
import com.google.firebase.database.DataSnapshot;
|
14
|
-
|
15
|
-
import com.google.firebase.database.DatabaseError;
|
16
|
-
|
17
|
-
import com.google.firebase.database.DatabaseReference;
|
18
|
-
|
19
|
-
import com.google.firebase.database.FirebaseDatabase;
|
20
|
-
|
21
|
-
import com.google.firebase.database.Query;
|
22
|
-
|
23
|
-
import com.google.firebase.database.ValueEventListener;
|
24
10
|
|
25
11
|
import android.widget.Toast;
|
26
12
|
|
3
import文の追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -7,6 +7,38 @@
|
|
7
7
|
動的にチェックボックスを追加したいのですが、どうすればいいのでしょうか?
|
8
8
|
|
9
9
|
```java
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
import com.google.firebase.database.DataSnapshot;
|
14
|
+
|
15
|
+
import com.google.firebase.database.DatabaseError;
|
16
|
+
|
17
|
+
import com.google.firebase.database.DatabaseReference;
|
18
|
+
|
19
|
+
import com.google.firebase.database.FirebaseDatabase;
|
20
|
+
|
21
|
+
import com.google.firebase.database.Query;
|
22
|
+
|
23
|
+
import com.google.firebase.database.ValueEventListener;
|
24
|
+
|
25
|
+
import android.widget.Toast;
|
26
|
+
|
27
|
+
import android.support.v7.app.AppCompatActivity;
|
28
|
+
|
29
|
+
import android.os.Bundle;
|
30
|
+
|
31
|
+
import android.view.View;
|
32
|
+
|
33
|
+
import android.widget.CheckBox;
|
34
|
+
|
35
|
+
import android.widget.LinearLayout;
|
36
|
+
|
37
|
+
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
public class MovieDownload extends AppCompatActivity implements View.OnClickListener {
|
10
42
|
|
11
43
|
CheckBox checkbox = new CheckBox(MovieDownload.this);
|
12
44
|
|
@@ -28,4 +60,6 @@
|
|
28
60
|
|
29
61
|
setContentView(layout);
|
30
62
|
|
63
|
+
}
|
64
|
+
|
31
65
|
```
|
2
誤字
test
CHANGED
File without changes
|
test
CHANGED
@@ -18,7 +18,7 @@
|
|
18
18
|
|
19
19
|
//この下で、can not resolve symbol'addView'が出ます。
|
20
20
|
|
21
|
-
//そして、unKnow class LinerLayout
|
21
|
+
//そして、unKnow class LinerLayout.LayoutParams.WRAP.CONTENTが出ます
|
22
22
|
|
23
23
|
layout.addView(checkbox, new LinearLayout.LayoutParams(
|
24
24
|
|
1
エラーの追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -10,13 +10,17 @@
|
|
10
10
|
|
11
11
|
CheckBox checkbox = new CheckBox(MovieDownload.this);
|
12
12
|
|
13
|
-
checkbox.setText("チェックボックス");
|
13
|
+
checkbox.setText("チェックボックス"); //can not resolve symbol'setText'が出ます。
|
14
14
|
|
15
15
|
// レイアウトにチェックボックスを追加
|
16
16
|
|
17
17
|
LinearLayout layout = new LinearLayout(MovieDownload.this);
|
18
18
|
|
19
|
+
//この下で、can not resolve symbol'addView'が出ます。
|
20
|
+
|
21
|
+
//そして、unKnow class LinerLayout LayoutParams.WRAP.CONTENTが出ます
|
22
|
+
|
19
|
-
layout.addView(chkbox, new LinearLayout.LayoutParams(
|
23
|
+
layout.addView(checkbox, new LinearLayout.LayoutParams(
|
20
24
|
|
21
25
|
LinearLayout.LayoutParams.WRAP_CONTENT,
|
22
26
|
|