mmayoub

MathApp, activity_play.xml

Sep 11th, 2021 (edited)
914
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 2.99 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <LinearLayout 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:orientation="vertical"
  8.    tools:context=".PlayActivity">
  9.  
  10.     <TextView
  11.        android:id="@+id/tvScore"
  12.        android:layout_width="wrap_content"
  13.        android:layout_height="wrap_content"
  14.        android:layout_gravity="center"
  15.        android:layout_margin="6dp"
  16.        android:background="#CCFFCC"
  17.        android:text="0 / 0"
  18.        android:textAlignment="center"
  19.        android:textColor="#C62828"
  20.        android:textSize="30sp"
  21.        android:textStyle="bold" />
  22.  
  23.     <TextView
  24.        android:id="@+id/tvNo1"
  25.        android:layout_width="match_parent"
  26.        android:layout_height="wrap_content"
  27.        android:text="TextView"
  28.        android:textAlignment="center"
  29.        android:textSize="20sp"
  30.        android:textStyle="bold" />
  31.  
  32.     <TextView
  33.        android:id="@+id/tvOp"
  34.        android:layout_width="match_parent"
  35.        android:layout_height="wrap_content"
  36.        android:text="TextView"
  37.        android:textAlignment="center"
  38.        android:textSize="20sp"
  39.        android:textStyle="bold" />
  40.  
  41.     <TextView
  42.        android:id="@+id/tvNo2"
  43.        android:layout_width="match_parent"
  44.        android:layout_height="wrap_content"
  45.        android:text="TextView"
  46.        android:textAlignment="center"
  47.        android:textSize="20sp"
  48.        android:textStyle="bold" />
  49.  
  50.     <TextView
  51.        android:id="@+id/tvEqual"
  52.        android:layout_width="match_parent"
  53.        android:layout_height="wrap_content"
  54.        android:text="----------------------------"
  55.        android:textAlignment="center"
  56.        android:textSize="20sp"
  57.        android:textStyle="bold" />
  58.  
  59.     <LinearLayout
  60.        android:layout_width="match_parent"
  61.        android:layout_height="wrap_content"
  62.        android:orientation="horizontal">
  63.  
  64.         <EditText
  65.            android:id="@+id/etAnswer"
  66.            android:layout_width="0dp"
  67.            android:layout_height="wrap_content"
  68.            android:layout_weight="3"
  69.            android:ems="10"
  70.            android:hint="your answer"
  71.            android:inputType="number"
  72.            android:textAlignment="center"
  73.            android:textSize="20sp"
  74.            android:textStyle="bold" />
  75.  
  76.         <Button
  77.            android:id="@+id/btnCheck"
  78.            android:layout_width="0dp"
  79.            android:layout_height="wrap_content"
  80.            android:layout_weight="1"
  81.            android:onClick="checkAnswer"
  82.            android:text="check" />
  83.  
  84.     </LinearLayout>
  85.  
  86.     <ImageView
  87.        android:id="@+id/imgImage"
  88.        android:layout_width="match_parent"
  89.        android:layout_height="match_parent"
  90.        app:srcCompat="@drawable/ic_launcher_background" />
  91.  
  92. </LinearLayout>
Add Comment
Please, Sign In to add comment