Advertisement
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"
- android:background="#D69A9A"
- tools:context=".MainActivity">
- <TextView
- android:id="@+id/textView2"
- android:layout_width="match_parent"
- android:layout_height="wrap_content"
- android:layout_marginStart="16dp"
- android:layout_marginTop="16dp"
- android:layout_marginEnd="16dp"
- android:background="#6FD647"
- android:text="My CounterApplication"
- android:textAlignment="center"
- android:textColor="#0D47A1"
- android:textSize="24sp"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toTopOf="parent" />
- <ImageView
- android:id="@+id/imageView"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginStart="20dp"
- android:layout_marginTop="20dp"
- android:layout_marginEnd="20dp"
- android:scaleType="centerInside"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@+id/textView2"
- app:srcCompat="@drawable/my_logo" />
- <TextView
- android:id="@+id/tvCounter"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginTop="30dp"
- android:background="#F4E29E"
- android:text="13"
- android:textColor="#B71C1C"
- android:textSize="60sp"
- android:textStyle="bold"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintEnd_toEndOf="parent"
- app:layout_constraintStart_toStartOf="parent"
- app:layout_constraintTop_toBottomOf="@+id/imageView" />
- <Button
- android:id="@+id/btnMinus"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginEnd="16dp"
- android:onClick="minus"
- android:text="-"
- app:layout_constraintBottom_toBottomOf="@+id/tvCounter"
- app:layout_constraintEnd_toStartOf="@+id/tvCounter"
- app:layout_constraintTop_toTopOf="@+id/tvCounter" />
- <Button
- android:id="@+id/btnAdd"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginStart="16dp"
- android:onClick="add"
- android:text="+"
- app:layout_constraintBottom_toBottomOf="@+id/tvCounter"
- app:layout_constraintStart_toEndOf="@+id/tvCounter"
- app:layout_constraintTop_toTopOf="@+id/tvCounter" />
- <Button
- android:id="@+id/btnRestart"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginStart="16dp"
- android:layout_marginBottom="16dp"
- android:onClick="restart"
- android:text="Restart"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintStart_toStartOf="parent" />
- <Button
- android:id="@+id/btnQuit"
- android:layout_width="wrap_content"
- android:layout_height="wrap_content"
- android:layout_marginEnd="16dp"
- android:layout_marginBottom="16dp"
- android:onClick="exit"
- android:text="Quit"
- app:layout_constraintBottom_toBottomOf="parent"
- app:layout_constraintEnd_toEndOf="parent" />
- </androidx.constraintlayout.widget.ConstraintLayout>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement