Advertisement
mmayoub

MyMath, Layout xml file

Oct 7th, 2022
1,396
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 2.24 KB | Software | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
  3.    xmlns:app="http://schemas.android.com/apk/res-auto"
  4.    xmlns:tools="http://schemas.android.com/tools"
  5.    android:layout_width="match_parent"
  6.    android:layout_height="match_parent"
  7.    android:layout_margin="16dp"
  8.    tools:context=".MainActivity"
  9.    tools:layout_editor_absoluteX="0dp"
  10.    tools:layout_editor_absoluteY="0dp">
  11.  
  12.     <TextView
  13.        android:id="@+id/tvExercise"
  14.        android:layout_width="wrap_content"
  15.        android:layout_height="wrap_content"
  16.        android:layout_margin="16dp"
  17.        android:text="TextView"
  18.        android:textSize="34sp"
  19.        app:layout_constraintEnd_toEndOf="parent"
  20.        app:layout_constraintStart_toStartOf="parent"
  21.        app:layout_constraintTop_toTopOf="parent" />
  22.  
  23.     <TextView
  24.        android:id="@+id/textView2"
  25.        android:layout_width="wrap_content"
  26.        android:layout_height="wrap_content"
  27.        android:layout_margin="16dp"
  28.        android:text="="
  29.        android:textSize="34sp"
  30.        app:layout_constraintEnd_toEndOf="parent"
  31.        app:layout_constraintStart_toStartOf="parent"
  32.        app:layout_constraintTop_toBottomOf="@+id/tvExercise" />
  33.  
  34.     <Button
  35.        android:id="@+id/btnCheck"
  36.        android:layout_width="wrap_content"
  37.        android:layout_height="wrap_content"
  38.        android:layout_margin="16dp"
  39.        android:onClick="checkAnswer"
  40.        android:text="check"
  41.        app:layout_constraintEnd_toEndOf="parent"
  42.        app:layout_constraintStart_toStartOf="parent"
  43.        app:layout_constraintTop_toBottomOf="@+id/etAnswer" />
  44.  
  45.     <EditText
  46.        android:id="@+id/etAnswer"
  47.        android:layout_width="wrap_content"
  48.        android:layout_height="wrap_content"
  49.        android:layout_margin="16dp"
  50.        android:ems="10"
  51.        android:hint="Enter your answer here"
  52.        android:inputType="numberSigned|number"
  53.        android:textSize="34sp"
  54.        app:layout_constraintEnd_toEndOf="parent"
  55.        app:layout_constraintStart_toStartOf="parent"
  56.        app:layout_constraintTop_toBottomOf="@+id/textView2" />
  57. </androidx.constraintlayout.widget.ConstraintLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement