回答編集履歴

1

使うもの間違えた

2018/04/27 01:47

投稿

swordone
swordone

スコア20651

test CHANGED
@@ -4,9 +4,13 @@
4
4
 
5
5
  Toast.makeText(getActivity(), msg, Toast.LENGTH_LONG).show();
6
6
 
7
-
7
+ getApplicationContext()
8
8
 
9
+ Toast.makeText(ListViewSample2Activity.this, msg, Toast.LENGTH_LONG).show();
10
+
11
+ or
12
+
9
- Toast.makeText(ListViewSample2Activity.this.getActivity(), msg, Toast.LENGTH_LONG).show();
13
+ Toast.makeText(ListViewSample2Activity.this.getApplicationContext(), msg, Toast.LENGTH_LONG).show();
10
14
 
11
15
  ```
12
16