Commit ffb2eddd by likorn

Button back to return to mainActivity

parent 24244d9e
......@@ -2,6 +2,7 @@ package com.example.quickmax
import android.animation.ArgbEvaluator
import android.animation.ValueAnimator
import android.content.Intent
import android.graphics.Color
import android.os.Bundle
import android.os.CountDownTimer
......@@ -29,6 +30,7 @@ class TaskActivity : AppCompatActivity() {
setUpAnswerButtons()
timer.start()
startProgressBarAnimation()
btn_back.setOnClickListener { startActivity(Intent(this@TaskActivity, MainActivity::class.java)) }
}
fun reload() {
......
......@@ -8,7 +8,7 @@
android:background="#DADADA"
tools:context=".TaskActivity">
<androidx.constraintlayout.widget.ConstraintLayout
<LinearLayout
android:id="@+id/layout_gradient"
android:layout_width="0dp"
android:layout_height="0dp"
......@@ -20,18 +20,16 @@
app:layout_constraintTop_toTopOf="parent">
<ImageButton
android:id="@+id/imageButton"
android:id="@+id/btn_back"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:background="@android:color/transparent"
android:tint="@android:color/white"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_back" />
</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>
<TextView
android:id="@+id/tv_timer"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment