3
3
import androidx .appcompat .app .AppCompatActivity ;
4
4
5
5
import android .app .Activity ;
6
+ import android .app .ActivityManager ;
7
+ import android .content .ComponentName ;
8
+ import android .content .Context ;
6
9
import android .content .Intent ;
7
10
import android .os .Bundle ;
11
+ import android .util .Log ;
8
12
import android .view .MotionEvent ;
9
13
import android .view .View ;
10
14
import android .view .Window ;
11
15
import android .widget .TextView ;
12
16
17
+ import java .util .List ;
18
+
13
19
public class PopupActivity extends Activity {
14
20
15
21
TextView txtText1 ;
16
22
TextView txtText2 ;
17
23
TextView txtText3 ;
18
24
19
-
25
+ public static Activity popActivity ;
20
26
@ Override
21
27
protected void onCreate (Bundle savedInstanceState ) {
22
28
super .onCreate (savedInstanceState );
23
29
30
+
31
+ String currentActivityName = getClass ().getSimpleName ().trim ();
32
+ Log .v ("testerr" ,currentActivityName );
33
+
34
+
35
+
36
+
24
37
//질문 리스트 16개
25
38
String [] quesList ={
26
39
"Q. 오늘 하루중 기억에 남기고 싶은 것은?" ,
@@ -49,10 +62,14 @@ protected void onCreate(Bundle savedInstanceState) {
49
62
txtText1 = (TextView )findViewById (R .id .txtText1 );
50
63
txtText2 = (TextView )findViewById (R .id .txtText2 );
51
64
txtText3 = (TextView )findViewById (R .id .txtText3 );
52
-
53
- //데이터 가져오기
54
- Intent intent = getIntent ();
55
-
65
+ Intent intent ;
66
+ try {
67
+ //데이터 가져오기
68
+ intent = getIntent ();
69
+ }catch (Exception e ){
70
+ intent = getIntent ();
71
+ finish ();
72
+ }
56
73
String Tempdata = intent .getStringExtra ("data" );
57
74
String data []=Tempdata .split ("\n " );
58
75
txtText1 .setText (data [0 ].substring (0 ,10 ));
@@ -71,8 +88,8 @@ public void mOnClose(View v){
71
88
72
89
//액티비티(팝업) 닫기
73
90
finish ();
91
+ // this.onStop();
74
92
75
- //onStop();
76
93
}
77
94
78
95
@ Override
@@ -89,5 +106,6 @@ public void onBackPressed() {
89
106
//안드로이드 백버튼 막기
90
107
return ;
91
108
}
109
+
92
110
}
93
111
0 commit comments