Commit ffb2eddd by likorn

Button back to return to mainActivity

parent 24244d9e
...@@ -2,6 +2,7 @@ package com.example.quickmax ...@@ -2,6 +2,7 @@ package com.example.quickmax
import android.animation.ArgbEvaluator import android.animation.ArgbEvaluator
import android.animation.ValueAnimator import android.animation.ValueAnimator
import android.content.Intent
import android.graphics.Color import android.graphics.Color
import android.os.Bundle import android.os.Bundle
import android.os.CountDownTimer import android.os.CountDownTimer
...@@ -29,6 +30,7 @@ class TaskActivity : AppCompatActivity() { ...@@ -29,6 +30,7 @@ class TaskActivity : AppCompatActivity() {
setUpAnswerButtons() setUpAnswerButtons()
timer.start() timer.start()
startProgressBarAnimation() startProgressBarAnimation()
btn_back.setOnClickListener { startActivity(Intent(this@TaskActivity, MainActivity::class.java)) }
} }
fun reload() { fun reload() {
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
android:background="#DADADA" android:background="#DADADA"
tools:context=".TaskActivity"> tools:context=".TaskActivity">
<androidx.constraintlayout.widget.ConstraintLayout <LinearLayout
android:id="@+id/layout_gradient" android:id="@+id/layout_gradient"
android:layout_width="0dp" android:layout_width="0dp"
android:layout_height="0dp" android:layout_height="0dp"
...@@ -20,18 +20,16 @@ ...@@ -20,18 +20,16 @@
app:layout_constraintTop_toTopOf="parent"> app:layout_constraintTop_toTopOf="parent">
<ImageButton <ImageButton
android:id="@+id/imageButton" android:id="@+id/btn_back"
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_marginStart="8dp" android:layout_marginStart="8dp"
android:layout_marginTop="8dp" android:layout_marginTop="8dp"
android:background="@android:color/transparent" android:background="@android:color/transparent"
android:tint="@android:color/white" android:tint="@android:color/white"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:srcCompat="@drawable/ic_back" /> app:srcCompat="@drawable/ic_back" />
</androidx.constraintlayout.widget.ConstraintLayout> </LinearLayout>
<TextView <TextView
android:id="@+id/tv_timer" 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