質問編集履歴

1

レイアウトファイルを追加しました

2021/07/24 05:33

投稿

merrill
merrill

スコア1

test CHANGED
File without changes
test CHANGED
@@ -413,3 +413,201 @@
413
413
 
414
414
 
415
415
  Android Studio 4.2.2
416
+
417
+
418
+
419
+ ### 追記
420
+
421
+
422
+
423
+ activity_main.xml
424
+
425
+
426
+
427
+ ```xml
428
+
429
+ <?xml version="1.0" encoding="utf-8"?>
430
+
431
+ <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
432
+
433
+ xmlns:app="http://schemas.android.com/apk/res-auto"
434
+
435
+ xmlns:tools="http://schemas.android.com/tools"
436
+
437
+ android:layout_width="match_parent"
438
+
439
+ android:layout_height="match_parent"
440
+
441
+ tools:context=".MainActivity">
442
+
443
+
444
+
445
+ <androidx.recyclerview.widget.RecyclerView
446
+
447
+ android:id="@+id/list"
448
+
449
+ android:layout_width="0dp"
450
+
451
+ android:layout_height="0dp"
452
+
453
+ app:layout_constraintBottom_toBottomOf="parent"
454
+
455
+ app:layout_constraintEnd_toEndOf="parent"
456
+
457
+ app:layout_constraintStart_toStartOf="parent"
458
+
459
+ app:layout_constraintTop_toTopOf="parent" />
460
+
461
+ </androidx.constraintlayout.widget.ConstraintLayout>
462
+
463
+ ```
464
+
465
+
466
+
467
+ fragment_red.xml
468
+
469
+
470
+
471
+ ```xml
472
+
473
+ <?xml version="1.0" encoding="utf-8"?>
474
+
475
+ <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
476
+
477
+ xmlns:app="http://schemas.android.com/apk/res-auto"
478
+
479
+ xmlns:tools="http://schemas.android.com/tools"
480
+
481
+ android:id="@+id/constraintLayout"
482
+
483
+ android:layout_width="match_parent"
484
+
485
+ android:layout_height="60dp"
486
+
487
+ tools:context=".RedFragment">
488
+
489
+
490
+
491
+ <!-- TODO: Update blank fragment layout -->
492
+
493
+ <TextView
494
+
495
+ android:id="@+id/text"
496
+
497
+ android:layout_width="0dp"
498
+
499
+ android:layout_height="wrap_content"
500
+
501
+ android:text="@string/hello_blank_fragment"
502
+
503
+ app:layout_constraintEnd_toEndOf="parent"
504
+
505
+ app:layout_constraintStart_toStartOf="parent"
506
+
507
+ app:layout_constraintTop_toTopOf="parent" />
508
+
509
+
510
+
511
+ </androidx.constraintlayout.widget.ConstraintLayout>
512
+
513
+ ```
514
+
515
+
516
+
517
+ fragment_orange.xml
518
+
519
+
520
+
521
+ ```xml
522
+
523
+ <?xml version="1.0" encoding="utf-8"?>
524
+
525
+ <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
526
+
527
+ xmlns:app="http://schemas.android.com/apk/res-auto"
528
+
529
+ xmlns:tools="http://schemas.android.com/tools"
530
+
531
+ android:id="@+id/constraintLayout"
532
+
533
+ android:layout_width="match_parent"
534
+
535
+ android:layout_height="60dp"
536
+
537
+ tools:context=".OrangeFragment">
538
+
539
+
540
+
541
+ <!-- TODO: Update blank fragment layout -->
542
+
543
+ <TextView
544
+
545
+ android:id="@+id/text"
546
+
547
+ android:layout_width="0dp"
548
+
549
+ android:layout_height="wrap_content"
550
+
551
+ android:text="@string/hello_blank_fragment"
552
+
553
+ app:layout_constraintEnd_toEndOf="parent"
554
+
555
+ app:layout_constraintStart_toStartOf="parent"
556
+
557
+ app:layout_constraintTop_toTopOf="parent" />
558
+
559
+
560
+
561
+ </androidx.constraintlayout.widget.ConstraintLayout>
562
+
563
+ ```
564
+
565
+
566
+
567
+ fragment_yellow.xml
568
+
569
+
570
+
571
+ ```xml
572
+
573
+ <?xml version="1.0" encoding="utf-8"?>
574
+
575
+ <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
576
+
577
+ xmlns:app="http://schemas.android.com/apk/res-auto"
578
+
579
+ xmlns:tools="http://schemas.android.com/tools"
580
+
581
+ android:id="@+id/constraintLayout"
582
+
583
+ android:layout_width="match_parent"
584
+
585
+ android:layout_height="60dp"
586
+
587
+ tools:context=".YellowFragment">
588
+
589
+
590
+
591
+ <!-- TODO: Update blank fragment layout -->
592
+
593
+ <TextView
594
+
595
+ android:id="@+id/text"
596
+
597
+ android:layout_width="0dp"
598
+
599
+ android:layout_height="wrap_content"
600
+
601
+ android:text="@string/hello_blank_fragment"
602
+
603
+ app:layout_constraintEnd_toEndOf="parent"
604
+
605
+ app:layout_constraintStart_toStartOf="parent"
606
+
607
+ app:layout_constraintTop_toTopOf="parent" />
608
+
609
+
610
+
611
+ </androidx.constraintlayout.widget.ConstraintLayout>
612
+
613
+ ```