Advertisement
mmayoub

Counter, activity_main,xml

Oct 15th, 2021
913
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 2.30 KB | None | 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:background="@android:drawable/presence_online"
  8.    tools:context=".MainActivity">
  9.  
  10.     <ImageButton
  11.        android:id="@+id/imageButton"
  12.        android:layout_width="87dp"
  13.        android:layout_height="81dp"
  14.        android:layout_marginStart="6dp"
  15.        android:layout_marginTop="6dp"
  16.        android:onClick="nextActivity"
  17.        android:scaleType="fitXY"
  18.        android:src="@android:drawable/btn_dialog"
  19.        app:layout_constraintStart_toStartOf="parent"
  20.        app:layout_constraintTop_toTopOf="parent"
  21.        tools:ignore="SpeakableTextPresentCheck" />
  22.  
  23.     <Button
  24.        android:id="@+id/btnClick"
  25.        android:layout_width="wrap_content"
  26.        android:layout_height="wrap_content"
  27.        android:layout_marginBottom="50dp"
  28.        android:onClick="handleClick"
  29.        android:text="Click"
  30.        android:textSize="34sp"
  31.        app:layout_constraintBottom_toBottomOf="parent"
  32.        app:layout_constraintEnd_toEndOf="parent"
  33.        app:layout_constraintStart_toStartOf="parent" />
  34.  
  35.     <TextView
  36.        android:id="@+id/tvCount"
  37.        android:layout_width="wrap_content"
  38.        android:layout_height="wrap_content"
  39.        android:text="0"
  40.        android:textSize="96sp"
  41.        android:textStyle="bold"
  42.        app:layout_constraintBottom_toTopOf="@+id/btnClick"
  43.        app:layout_constraintEnd_toEndOf="parent"
  44.        app:layout_constraintStart_toStartOf="parent"
  45.        app:layout_constraintTop_toBottomOf="@+id/imageButton" />
  46.  
  47.     <Button
  48.        android:id="@+id/btnReset"
  49.        android:layout_width="wrap_content"
  50.        android:layout_height="wrap_content"
  51.        android:layout_marginTop="6dp"
  52.        android:layout_marginEnd="6dp"
  53.        android:onClick="handleResetClick"
  54.        android:text="Reset"
  55.        android:textSize="24sp"
  56.        app:layout_constraintEnd_toEndOf="parent"
  57.        app:layout_constraintTop_toTopOf="parent" />
  58.  
  59. </androidx.constraintlayout.widget.ConstraintLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement