質問編集履歴

1

product_boxの追記

2018/06/16 11:19

投稿

syyyow
syyyow

スコア28

test CHANGED
File without changes
test CHANGED
@@ -385,3 +385,107 @@
385
385
  こちらを教えていただきたく思います。
386
386
 
387
387
  追記もいたしますのでアドバイス宜しくお願い致します。
388
+
389
+
390
+
391
+
392
+
393
+ 【追記】
394
+
395
+
396
+
397
+ ```java
398
+
399
+
400
+
401
+ product_box.java
402
+
403
+
404
+
405
+ import android.content.Intent;
406
+
407
+ import android.support.v7.app.AppCompatActivity;
408
+
409
+ import android.os.Bundle;
410
+
411
+ import android.widget.TextView;
412
+
413
+
414
+
415
+ public class Product_box extends AppCompatActivity {
416
+
417
+
418
+
419
+ @Override
420
+
421
+ protected void onCreate(Bundle savedInstanceState) {
422
+
423
+ super.onCreate(savedInstanceState);
424
+
425
+ setContentView(R.layout.activity_product_box);
426
+
427
+
428
+
429
+ Intent intent = getIntent();
430
+
431
+ String text = intent.getStringExtra("sendText");
432
+
433
+ TextView textView = (TextView)this.findViewById(R.id.imageButton);
434
+
435
+ textView.setText(text);
436
+
437
+ }
438
+
439
+
440
+
441
+
442
+
443
+ }
444
+
445
+
446
+
447
+ ```
448
+
449
+
450
+
451
+
452
+
453
+ ```java
454
+
455
+
456
+
457
+ product_box.xml
458
+
459
+
460
+
461
+ <?xml version="1.0" encoding="utf-8"?>
462
+
463
+ <LinearLayout
464
+
465
+ xmlns:android="http://schemas.android.com/apk/res/android"
466
+
467
+ android:layout_width="match_parent"
468
+
469
+ android:layout_height="match_parent">
470
+
471
+
472
+
473
+ <TextView
474
+
475
+ android:layout_width="wrap_content"
476
+
477
+ android:layout_height="wrap_content"
478
+
479
+ android:text="Box野菜"
480
+
481
+ android:textSize="30dp"
482
+
483
+ android:id="@+id/textView"/>
484
+
485
+
486
+
487
+ </LinearLayout>
488
+
489
+
490
+
491
+ ```