diff --git a/.idea/.gitignore b/.idea/.gitignore
new file mode 100644
index 0000000..26d3352
--- /dev/null
+++ b/.idea/.gitignore
@@ -0,0 +1,3 @@
+# Default ignored files
+/shelf/
+/workspace.xml
diff --git a/.idea/AndroidProjectSystem.xml b/.idea/AndroidProjectSystem.xml
new file mode 100644
index 0000000..4a53bee
--- /dev/null
+++ b/.idea/AndroidProjectSystem.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/compiler.xml b/.idea/compiler.xml
new file mode 100644
index 0000000..b86273d
--- /dev/null
+++ b/.idea/compiler.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/deploymentTargetSelector.xml b/.idea/deploymentTargetSelector.xml
new file mode 100644
index 0000000..b268ef3
--- /dev/null
+++ b/.idea/deploymentTargetSelector.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/gradle.xml b/.idea/gradle.xml
new file mode 100644
index 0000000..639c779
--- /dev/null
+++ b/.idea/gradle.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/kotlinc.xml b/.idea/kotlinc.xml
new file mode 100644
index 0000000..c224ad5
--- /dev/null
+++ b/.idea/kotlinc.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/migrations.xml b/.idea/migrations.xml
new file mode 100644
index 0000000..f8051a6
--- /dev/null
+++ b/.idea/migrations.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/misc.xml b/.idea/misc.xml
new file mode 100644
index 0000000..74dd639
--- /dev/null
+++ b/.idea/misc.xml
@@ -0,0 +1,10 @@
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/render.experimental.xml b/.idea/render.experimental.xml
new file mode 100644
index 0000000..8ec256a
--- /dev/null
+++ b/.idea/render.experimental.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml
new file mode 100644
index 0000000..16660f1
--- /dev/null
+++ b/.idea/runConfigurations.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/.idea/vcs.xml b/.idea/vcs.xml
new file mode 100644
index 0000000..94a25f7
--- /dev/null
+++ b/.idea/vcs.xml
@@ -0,0 +1,6 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index 1fbfd72..94a7c18 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -12,6 +12,9 @@
android:supportsRtl="true"
android:theme="@style/Theme.TimerT"
tools:targetApi="31">
+
diff --git a/app/src/main/java/com/example/timert/MainActivity.kt b/app/src/main/java/com/example/timert/MainActivity.kt
index 5de3e5b..64aa7df 100644
--- a/app/src/main/java/com/example/timert/MainActivity.kt
+++ b/app/src/main/java/com/example/timert/MainActivity.kt
@@ -1,6 +1,8 @@
package com.example.timert
+import android.content.Intent
import android.os.Bundle
+import android.widget.Button
import androidx.activity.enableEdgeToEdge
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.ViewCompat
@@ -16,5 +18,12 @@ class MainActivity : AppCompatActivity() {
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
insets
}
+ var button: Button = findViewById(R.id.button2)
+
+ button.setOnClickListener{
+ val intent = Intent(this,timer::class.java)
+ startActivity(intent)
+ }
}
+
}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/timert/timer.kt b/app/src/main/java/com/example/timert/timer.kt
new file mode 100644
index 0000000..b056dd2
--- /dev/null
+++ b/app/src/main/java/com/example/timert/timer.kt
@@ -0,0 +1,62 @@
+package com.example.timert
+
+import android.app.AlertDialog
+import android.content.Intent
+import android.media.Image
+import android.os.Bundle
+import android.widget.Button
+import android.widget.ImageButton
+import androidx.activity.enableEdgeToEdge
+import androidx.appcompat.app.AppCompatActivity
+import androidx.core.view.ViewCompat
+import androidx.core.view.WindowInsetsCompat
+
+class timer : AppCompatActivity() {
+ private var isPlay = false
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ enableEdgeToEdge()
+ setContentView(R.layout.activity_timer)
+ ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main)) { v, insets ->
+ val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars())
+ v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
+ insets
+ }
+ val button: ImageButton = findViewById(R.id.stop)
+ button.setOnClickListener {
+ AlertDialog.Builder(this)
+ .setTitle("Сброс таймера")
+ .setMessage("Закрыть таймер и перейти на главную страницу?")
+ .setPositiveButton("Да") { _, _ ->
+
+ val intent = Intent(this, MainActivity::class.java)
+ startActivity(intent)
+ }
+ .setNegativeButton("Нет") { dialog, _ ->
+ dialog.dismiss()
+ }
+ .show()
+ }
+
+
+
+ val pauseButton: ImageButton = findViewById(R.id.play)
+
+ pauseButton.setOnClickListener {
+ if (isPlay) {
+
+ pauseButton.setImageResource(R.drawable.icon_play)
+ // здесь ещё можно возобновить таймер
+ } else {
+
+ pauseButton.setImageResource(R.drawable.icon_pause)
+ // здесь можно остановить таймер
+ }
+ isPlay = !isPlay
+ }
+
+
+
+ }
+
+}
\ No newline at end of file
diff --git a/app/src/main/res/drawable/blue_gradient.xml b/app/src/main/res/drawable/blue_gradient.xml
new file mode 100644
index 0000000..c8a862e
--- /dev/null
+++ b/app/src/main/res/drawable/blue_gradient.xml
@@ -0,0 +1,9 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/gradient_pink.xml b/app/src/main/res/drawable/gradient_pink.xml
new file mode 100644
index 0000000..a037506
--- /dev/null
+++ b/app/src/main/res/drawable/gradient_pink.xml
@@ -0,0 +1,9 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/green_gradient.xml b/app/src/main/res/drawable/green_gradient.xml
new file mode 100644
index 0000000..692f367
--- /dev/null
+++ b/app/src/main/res/drawable/green_gradient.xml
@@ -0,0 +1,9 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/icon_pause.xml b/app/src/main/res/drawable/icon_pause.xml
new file mode 100644
index 0000000..57477a9
--- /dev/null
+++ b/app/src/main/res/drawable/icon_pause.xml
@@ -0,0 +1,10 @@
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/icon_play.xml b/app/src/main/res/drawable/icon_play.xml
new file mode 100644
index 0000000..13c137a
--- /dev/null
+++ b/app/src/main/res/drawable/icon_play.xml
@@ -0,0 +1,10 @@
+
+
+
diff --git a/app/src/main/res/drawable/icon_stop.xml b/app/src/main/res/drawable/icon_stop.xml
new file mode 100644
index 0000000..34bd28f
--- /dev/null
+++ b/app/src/main/res/drawable/icon_stop.xml
@@ -0,0 +1,10 @@
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/drawable/pink_gradient.xml b/app/src/main/res/drawable/pink_gradient.xml
new file mode 100644
index 0000000..a037506
--- /dev/null
+++ b/app/src/main/res/drawable/pink_gradient.xml
@@ -0,0 +1,9 @@
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index 86a5d97..667c9ae 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -7,13 +7,17 @@
android:layout_height="match_parent"
tools:context=".MainActivity">
-
+
+
+
+
+
-
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_timer.xml b/app/src/main/res/layout/activity_timer.xml
new file mode 100644
index 0000000..6a36635
--- /dev/null
+++ b/app/src/main/res/layout/activity_timer.xml
@@ -0,0 +1,137 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml
index c8524cd..95fc093 100644
--- a/app/src/main/res/values/colors.xml
+++ b/app/src/main/res/values/colors.xml
@@ -2,4 +2,14 @@
#FF000000
#FFFFFFFF
+
+ #F54EA2
+ #FF7676
+
+ #42E695
+ #3BB2B8
+
+ #17EAD9
+ #6078EA
+
\ No newline at end of file