質問編集履歴
2
書式の改善
test
CHANGED
File without changes
|
test
CHANGED
@@ -20,7 +20,7 @@
|
|
20
20
|
|
21
21
|
```Java
|
22
22
|
|
23
|
-
|
23
|
+
B画面
|
24
24
|
|
25
25
|
@Override
|
26
26
|
|
@@ -68,7 +68,7 @@
|
|
68
68
|
|
69
69
|
fl1 = (FrameLayout) findViewById(id.fl1);
|
70
70
|
|
71
|
-
fl1.setBackgroundResource(R.drawable.bg_light);//ここの背景真っ暗になる
|
71
|
+
fl1.setBackgroundResource(R.drawable.bg_light);//ここの背景が真っ暗になる
|
72
72
|
|
73
73
|
|
74
74
|
|
@@ -124,8 +124,6 @@
|
|
124
124
|
|
125
125
|
}
|
126
126
|
|
127
|
-
|
128
|
-
|
129
127
|
}
|
130
128
|
|
131
129
|
|
@@ -172,8 +170,6 @@
|
|
172
170
|
|
173
171
|
}
|
174
172
|
|
175
|
-
|
176
|
-
|
177
173
|
}
|
178
174
|
|
179
175
|
|
@@ -210,9 +206,11 @@
|
|
210
206
|
|
211
207
|
|
212
208
|
|
213
|
-
|
209
|
+
```
|
214
|
-
|
210
|
+
|
211
|
+
|
212
|
+
|
215
|
-
|
213
|
+
```Java
|
216
214
|
|
217
215
|
A画面
|
218
216
|
|
1
ソースコードの追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -13,3 +13,365 @@
|
|
13
13
|
|
14
14
|
|
15
15
|
よろしくお願いいたします。
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
【追記】
|
20
|
+
|
21
|
+
```Java
|
22
|
+
|
23
|
+
//B画面
|
24
|
+
|
25
|
+
@Override
|
26
|
+
|
27
|
+
public void run() {
|
28
|
+
|
29
|
+
setVolumeControlStream(AudioManager.STREAM_MUSIC);
|
30
|
+
|
31
|
+
setContentView(R.layout.layout11);
|
32
|
+
|
33
|
+
|
34
|
+
|
35
|
+
context = getApplicationContext();
|
36
|
+
|
37
|
+
Activity11.setFlg_go_on_bgm_menu(false);
|
38
|
+
|
39
|
+
|
40
|
+
|
41
|
+
if (globals == null) {
|
42
|
+
|
43
|
+
globals = (Globals) this.getApplication();
|
44
|
+
|
45
|
+
}
|
46
|
+
|
47
|
+
if (globals.getMenu_bgm() == null) {
|
48
|
+
|
49
|
+
globals.menu_load(this);
|
50
|
+
|
51
|
+
}
|
52
|
+
|
53
|
+
|
54
|
+
|
55
|
+
se = new MySe(this);
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
intent = getIntent();
|
60
|
+
|
61
|
+
extras = intent.getExtras();
|
62
|
+
|
63
|
+
flg_show_tips = (Boolean) (extras != null ? extras.getBoolean("FLG_SHOW_TIPS", flg_show_tips) : false);
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
fl1 = (FrameLayout) findViewById(id.fl1);
|
70
|
+
|
71
|
+
fl1.setBackgroundResource(R.drawable.bg_light);//ここの背景真っ暗になる
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
Button backbutton = (Button) findViewById(id.backbutton);
|
78
|
+
|
79
|
+
MyResize mr = new MyResize(context);
|
80
|
+
|
81
|
+
backbutton.setTextSize(mr.dp_width() / getResources().getInteger(R.integer.divide_txt_size_btn_l));
|
82
|
+
|
83
|
+
makeBtn();
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
progressDialog.dismiss();
|
88
|
+
|
89
|
+
}
|
90
|
+
|
91
|
+
|
92
|
+
|
93
|
+
|
94
|
+
|
95
|
+
@Override
|
96
|
+
|
97
|
+
protected void onCreate(Bundle savedInstanceState) {
|
98
|
+
|
99
|
+
super.onCreate(savedInstanceState);
|
100
|
+
|
101
|
+
|
102
|
+
|
103
|
+
progressDialog = new ProgressDialog(this);
|
104
|
+
|
105
|
+
progressDialog.setTitle("ロード中");
|
106
|
+
|
107
|
+
progressDialog.setMessage("少々お待ち下さい");
|
108
|
+
|
109
|
+
progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
|
110
|
+
|
111
|
+
progressDialog.show();
|
112
|
+
|
113
|
+
thread = new Thread(this);
|
114
|
+
|
115
|
+
thread.start();
|
116
|
+
|
117
|
+
try {
|
118
|
+
|
119
|
+
thread.join();
|
120
|
+
|
121
|
+
} catch (InterruptedException e1) {
|
122
|
+
|
123
|
+
e1.printStackTrace();
|
124
|
+
|
125
|
+
}
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
}
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
@Override
|
136
|
+
|
137
|
+
protected void onResume() {
|
138
|
+
|
139
|
+
super.onResume();
|
140
|
+
|
141
|
+
if (globals.getMenu_bgm() != null) {
|
142
|
+
|
143
|
+
if (!globals.getMenu_bgm().isPlaying()) {
|
144
|
+
|
145
|
+
globals.menu_start();
|
146
|
+
|
147
|
+
}
|
148
|
+
|
149
|
+
}
|
150
|
+
|
151
|
+
}
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
@Override
|
156
|
+
|
157
|
+
protected void onPause() {
|
158
|
+
|
159
|
+
super.onPause();
|
160
|
+
|
161
|
+
if (!Activity11.getFlg_go_on_bgm_menu()) {
|
162
|
+
|
163
|
+
if (Activity11.getGlobals().getMenu_bgm() != null) {
|
164
|
+
|
165
|
+
if (Activity11.getGlobals().getMenu_bgm().isPlaying()) {
|
166
|
+
|
167
|
+
Activity11.getGlobals().menu_pause();
|
168
|
+
|
169
|
+
}
|
170
|
+
|
171
|
+
}
|
172
|
+
|
173
|
+
}
|
174
|
+
|
175
|
+
|
176
|
+
|
177
|
+
}
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
private void makeBtn() {
|
182
|
+
|
183
|
+
button = new Button(this);
|
184
|
+
|
185
|
+
button = (Button) findViewById(id.backbutton);
|
186
|
+
|
187
|
+
button.setText("back");
|
188
|
+
|
189
|
+
button.setOnClickListener(new OnClickListener() {
|
190
|
+
|
191
|
+
public void onClick(View view) {
|
192
|
+
|
193
|
+
Activity11.setFlg_go_on_bgm_menu(false);
|
194
|
+
|
195
|
+
se.se_back();
|
196
|
+
|
197
|
+
intent = new Intent(Activity11.this, Activity10.class);
|
198
|
+
|
199
|
+
intent.putExtra("FLG_SHOW_TIPS", flg_show_tips);
|
200
|
+
|
201
|
+
startActivity(intent);
|
202
|
+
|
203
|
+
finish();
|
204
|
+
|
205
|
+
}
|
206
|
+
|
207
|
+
});
|
208
|
+
|
209
|
+
}
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
//--------------
|
216
|
+
|
217
|
+
A画面
|
218
|
+
|
219
|
+
|
220
|
+
|
221
|
+
@Override
|
222
|
+
|
223
|
+
public void run() {
|
224
|
+
|
225
|
+
setVolumeControlStream(AudioManager.STREAM_MUSIC);
|
226
|
+
|
227
|
+
setContentView(R.layout.layout10);
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
context = getApplicationContext();
|
232
|
+
|
233
|
+
if(mr == null)mr = new MyResize(context);
|
234
|
+
|
235
|
+
if(myBgm == null)myBgm = new MyBgm(this);
|
236
|
+
|
237
|
+
myBgm.title_load();
|
238
|
+
|
239
|
+
if(!myBgm.getBgm_title().isPlaying())myBgm.title_start();
|
240
|
+
|
241
|
+
if(se == null)se = new MySe(this);
|
242
|
+
|
243
|
+
|
244
|
+
|
245
|
+
intent = getIntent();
|
246
|
+
|
247
|
+
extras = intent.getExtras();
|
248
|
+
|
249
|
+
flg_show_tips = (Boolean) (extras != null ? extras.getBoolean("FLG_SHOW_TIPS", flg_show_tips) : false);
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
fl2 = (FrameLayout) findViewById(id.fl2);
|
254
|
+
|
255
|
+
fl2.setBackgroundResource(R.drawable.bg_light);
|
256
|
+
|
257
|
+
|
258
|
+
|
259
|
+
title1 = (TextView) findViewById(id.title1);
|
260
|
+
|
261
|
+
Button go_btn = (Button) findViewById(id.go_btn);
|
262
|
+
|
263
|
+
go_btn.setText("start");
|
264
|
+
|
265
|
+
go_btn.setTextSize(mr.dp_width() / 20f);
|
266
|
+
|
267
|
+
title1.setText("title");
|
268
|
+
|
269
|
+
title1.setTextSize(mr.dp_width() / 7.0f);
|
270
|
+
|
271
|
+
title1.setY(-250.0f);
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
makeBtn();
|
276
|
+
|
277
|
+
progressDialog.dismiss();
|
278
|
+
|
279
|
+
}
|
280
|
+
|
281
|
+
|
282
|
+
|
283
|
+
@Override
|
284
|
+
|
285
|
+
protected void onCreate(Bundle savedInstanceState) {
|
286
|
+
|
287
|
+
super.onCreate(savedInstanceState);
|
288
|
+
|
289
|
+
|
290
|
+
|
291
|
+
progressDialog = new ProgressDialog(this);
|
292
|
+
|
293
|
+
progressDialog.setTitle("ロード中");
|
294
|
+
|
295
|
+
progressDialog.setMessage("少々お待ち下さい");
|
296
|
+
|
297
|
+
progressDialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);
|
298
|
+
|
299
|
+
progressDialog.show();
|
300
|
+
|
301
|
+
thread = new Thread(this);
|
302
|
+
|
303
|
+
thread.start();
|
304
|
+
|
305
|
+
try {
|
306
|
+
|
307
|
+
thread.join();
|
308
|
+
|
309
|
+
} catch (InterruptedException e1) {
|
310
|
+
|
311
|
+
e1.printStackTrace();
|
312
|
+
|
313
|
+
}
|
314
|
+
|
315
|
+
}
|
316
|
+
|
317
|
+
|
318
|
+
|
319
|
+
|
320
|
+
|
321
|
+
@Override
|
322
|
+
|
323
|
+
protected void onResume() {
|
324
|
+
|
325
|
+
super.onResume();
|
326
|
+
|
327
|
+
if (myBgm != null) {
|
328
|
+
|
329
|
+
if (!myBgm.getBgm_title().isPlaying()) {
|
330
|
+
|
331
|
+
myBgm.title_start();
|
332
|
+
|
333
|
+
}
|
334
|
+
|
335
|
+
}
|
336
|
+
|
337
|
+
title1.setVisibility(View.VISIBLE);
|
338
|
+
|
339
|
+
title1.setPivotX(0.0f);
|
340
|
+
|
341
|
+
title1.setPivotY(0.0f);
|
342
|
+
|
343
|
+
scaleX = PropertyValuesHolder.ofFloat("scaleX", 1.7f, 1.0f);
|
344
|
+
|
345
|
+
scaleY = PropertyValuesHolder.ofFloat("scaleY", 2.7f, 1.0f);
|
346
|
+
|
347
|
+
anim_title1 = ObjectAnimator.ofPropertyValuesHolder(title1, scaleX, scaleY);
|
348
|
+
|
349
|
+
anim_title1.setDuration(5000);
|
350
|
+
|
351
|
+
anim_title1.start();
|
352
|
+
|
353
|
+
}
|
354
|
+
|
355
|
+
|
356
|
+
|
357
|
+
@Override
|
358
|
+
|
359
|
+
protected void onPause() {
|
360
|
+
|
361
|
+
super.onPause();
|
362
|
+
|
363
|
+
if (myBgm != null) {
|
364
|
+
|
365
|
+
if (myBgm.getBgm_title().isPlaying()) {
|
366
|
+
|
367
|
+
myBgm.title_pause();
|
368
|
+
|
369
|
+
}
|
370
|
+
|
371
|
+
}
|
372
|
+
|
373
|
+
}
|
374
|
+
|
375
|
+
|
376
|
+
|
377
|
+
```
|