Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?xml version="1.0" encoding="utf-8"?>
- <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
- xmlns:app="http://schemas.android.com/apk/res-auto"
- xmlns:tools="http://schemas.android.com/tools"
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- tools:context=".MainActivity">
- <ImageView
- android:id="@+id/imageView"
- android:layout_width="407dp"
- android:layout_height="120dp"
- android:layout_marginTop="4dp"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent"
- app:srcCompat="@drawable/banner" />
- <TextView
- android:id="@+id/textView"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginTop="24dp"
- android:text="請點選下列水果圖示"
- android:textSize="34sp"
- app:layout_constraintLeft_toLeftOf="parent"
- app:layout_constraintRight_toRightOf="parent"
- app:layout_constraintTop_toBottomOf="@+id/imageView" />
- <TableLayout
- android:id="@+id/tableLayout"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginTop="80dp"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@+id/textView">
- <TableRow
- android:layout_width="match_parent"
- android:layout_height="match_parent"
- android:layout_gravity="center">
- <ImageView
- android:id="@+id/apple"
- android:layout_width="120dp"
- android:layout_height="match_parent"
- app:srcCompat="@drawable/apple" />
- <ImageView
- android:id="@+id/lemon"
- android:layout_width="120dp"
- android:layout_height="match_parent"
- app:srcCompat="@drawable/lemon" />
- <ImageView
- android:id="@+id/orange"
- android:layout_width="120dp"
- android:layout_height="120dp"
- app:srcCompat="@drawable/orange" />
- </TableRow>
- <TableRow
- android:layout_width="match_parent"
- android:layout_height="match_parent">
- <ImageView
- android:id="@+id/pumpkin"
- android:layout_width="120dp"
- android:layout_height="match_parent"
- app:srcCompat="@drawable/pumpkin" />
- <ImageView
- android:id="@+id/tomato"
- android:layout_width="120dp"
- android:layout_height="match_parent"
- app:srcCompat="@drawable/tomato" />
- <ImageView
- android:id="@+id/banana"
- android:layout_width="120dp"
- android:layout_height="120dp"
- app:srcCompat="@drawable/banana" />
- </TableRow>
- </TableLayout>
- <TextView
- android:id="@+id/Show"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginStart="108dp"
- android:layout_marginEnd="108dp"
- android:layout_marginBottom="100dp"
- android:textSize="48sp"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent" />
- </androidx.constraintlayout.widget.ConstraintLayout>
Add Comment
Please, Sign In to add comment