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/.name b/.idea/.name
new file mode 100644
index 0000000..9ba2af6
--- /dev/null
+++ b/.idea/.name
@@ -0,0 +1 @@
+TimerT
\ No newline at end of file
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/gradle.xml b/.idea/gradle.xml
new file mode 100644
index 0000000..97f0a8e
--- /dev/null
+++ b/.idea/gradle.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
\ 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/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..35eb1dd
--- /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..ac6dc37 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/ic_launcher-playstore.png b/app/src/main/ic_launcher-playstore.png
new file mode 100644
index 0000000..7ec0254
Binary files /dev/null and b/app/src/main/ic_launcher-playstore.png differ
diff --git a/app/src/main/java/com/example/timert/MainActivity.kt b/app/src/main/java/com/example/timert/MainActivity.kt
index 5de3e5b..11955e9 100644
--- a/app/src/main/java/com/example/timert/MainActivity.kt
+++ b/app/src/main/java/com/example/timert/MainActivity.kt
@@ -1,6 +1,9 @@
package com.example.timert
+import android.content.Intent
import android.os.Bundle
+import android.widget.Button
+import android.widget.Toast
import androidx.activity.enableEdgeToEdge
import androidx.appcompat.app.AppCompatActivity
import androidx.core.view.ViewCompat
@@ -16,5 +19,30 @@ class MainActivity : AppCompatActivity() {
v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom)
insets
}
+
+ val settingsButton: Button = findViewById(R.id.settingsButton)
+ settingsButton.setOnClickListener {
+ val intent = Intent(this, SettingsActivity::class.java)
+ startActivity(intent)
+ }
+
+
+ val startTrainingButton: Button = findViewById(R.id.startTrainingButton)
+ startTrainingButton.setOnClickListener {
+ Toast.makeText(this, "Запуск тренировки!", Toast.LENGTH_SHORT).show() // Заглушка
+ //TODO: Intent для запуска Activity тренировки (форма 5)
+ }
+
+ val templatesButton: Button = findViewById(R.id.templatesButton)
+ templatesButton.setOnClickListener {
+ Toast.makeText(this, "Открытие шаблонов!", Toast.LENGTH_SHORT).show() // Заглушка
+ //TODO: Intent для открытия Activity шаблонов (форма 3)
+ }
+
+ val newTemplateButton: Button = findViewById(R.id.newTemplateButton)
+ newTemplateButton.setOnClickListener {
+ Toast.makeText(this, "Создание нового шаблона!", Toast.LENGTH_SHORT).show() // Заглушка
+ //TODO: Intent для открытия Activity создания шаблона (форма 3)
+ }
}
}
\ No newline at end of file
diff --git a/app/src/main/java/com/example/timert/SettingsActivity.kt b/app/src/main/java/com/example/timert/SettingsActivity.kt
new file mode 100644
index 0000000..473f4da
--- /dev/null
+++ b/app/src/main/java/com/example/timert/SettingsActivity.kt
@@ -0,0 +1,83 @@
+package com.example.timert
+
+import android.content.Context
+import android.content.pm.PackageManager
+import android.os.Bundle
+import android.widget.Switch
+import android.widget.TextView
+import androidx.appcompat.app.AppCompatActivity
+import androidx.appcompat.app.AppCompatDelegate
+import android.widget.Button
+import androidx.appcompat.app.AlertDialog
+import androidx.core.text.HtmlCompat
+
+class SettingsActivity : AppCompatActivity() {
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ setContentView(R.layout.activity_settings2)
+
+ val versionTextView: TextView = findViewById(R.id.versionTextView)
+ val darkModeSwitch: Switch = findViewById(R.id.darkModeSwitch)
+ val aboutButton: Button = findViewById(R.id.aboutButton)
+ val developersButton: Button = findViewById(R.id.developersButton)
+
+ // Получаем сохраненное состояние темы из SharedPreferences
+ val sharedPreferences = getSharedPreferences("AppSettings", Context.MODE_PRIVATE)
+ val isDarkMode = sharedPreferences.getBoolean("DarkMode", false) // По умолчанию - светлая тема
+ darkModeSwitch.isChecked = isDarkMode
+
+ // Применяем тему
+ if (isDarkMode) {
+ AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES)
+ } else {
+ AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO)
+ }
+
+ try {
+ val packageInfo = packageManager.getPackageInfo(packageName, 0)
+ val versionName = packageInfo.versionName
+ versionTextView.text = "Версия: $versionName"
+ } catch (e: PackageManager.NameNotFoundException) {
+ versionTextView.text = "Версия: Неизвестно"
+ }
+
+ // Устанавливаем слушатель для Switch
+ darkModeSwitch.setOnCheckedChangeListener { _, isChecked ->
+ // Сохраняем состояние темы в SharedPreferences
+ val editor = sharedPreferences.edit()
+ editor.putBoolean("DarkMode", isChecked)
+ editor.apply()
+
+ // Применяем тему
+ if (isChecked) {
+ AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES)
+ } else {
+ AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO)
+ }
+ }
+
+ // Обработчик нажатия на кнопку "О программе"
+ aboutButton.setOnClickListener {
+ AlertDialog.Builder(this)
+ .setTitle("О программе")
+ .setMessage("Краткое описание пользования приложением.\n\nНапример: Это приложение позволяет тренироваться, чтобы быть как арнольдшварцнигер 😄")
+ .setPositiveButton("ОК", null)
+ .show()
+ }
+
+ // Обработчик нажатия на кнопку "Разработчики"
+ developersButton.setOnClickListener {
+ AlertDialog.Builder(this)
+ .setTitle("Разработчики")
+ .setMessage(HtmlCompat.fromHtml(
+ "Вятский государственный университет
" + // Дополнительный перенос строки
+ " Иванов Иван Иванович
" +
+ " Баркин Марк Анатольевич
" +
+ " Крупницын Альбрехт Абрамов",
+ HtmlCompat.FROM_HTML_MODE_LEGACY
+ ))
+ .setPositiveButton("ОК", null)
+ .show()
+ }
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/res/drawable/background_image.jpg b/app/src/main/res/drawable/background_image.jpg
new file mode 100644
index 0000000..fbe4192
Binary files /dev/null and b/app/src/main/res/drawable/background_image.jpg differ
diff --git a/app/src/main/res/drawable/ic_settings.xml b/app/src/main/res/drawable/ic_settings.xml
new file mode 100644
index 0000000..6593f3a
--- /dev/null
+++ b/app/src/main/res/drawable/ic_settings.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/app/src/main/res/layout/activity_main.xml b/app/src/main/res/layout/activity_main.xml
index 86a5d97..121b0dc 100644
--- a/app/src/main/res/layout/activity_main.xml
+++ b/app/src/main/res/layout/activity_main.xml
@@ -7,13 +7,92 @@
android:layout_height="match_parent"
tools:context=".MainActivity">
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_settings2.xml b/app/src/main/res/layout/activity_settings2.xml
new file mode 100644
index 0000000..8fad88e
--- /dev/null
+++ b/app/src/main/res/layout/activity_settings2.xml
@@ -0,0 +1,64 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
index 6f3b755..534c642 100644
--- a/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
+++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -1,6 +1,5 @@
-
-
-
+
+
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
index 6f3b755..534c642 100644
--- a/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
+++ b/app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
@@ -1,6 +1,5 @@
-
-
-
+
+
\ No newline at end of file
diff --git a/app/src/main/res/mipmap-hdpi/ic_icon.webp b/app/src/main/res/mipmap-hdpi/ic_icon.webp
new file mode 100644
index 0000000..6ad06e9
Binary files /dev/null and b/app/src/main/res/mipmap-hdpi/ic_icon.webp differ
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher.webp b/app/src/main/res/mipmap-hdpi/ic_launcher.webp
index c209e78..1149e83 100644
Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher.webp and b/app/src/main/res/mipmap-hdpi/ic_launcher.webp differ
diff --git a/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
index b2dfe3d..b118112 100644
Binary files a/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp and b/app/src/main/res/mipmap-hdpi/ic_launcher_round.webp differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_icon.webp b/app/src/main/res/mipmap-mdpi/ic_icon.webp
new file mode 100644
index 0000000..37233a9
Binary files /dev/null and b/app/src/main/res/mipmap-mdpi/ic_icon.webp differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher.webp b/app/src/main/res/mipmap-mdpi/ic_launcher.webp
index 4f0f1d6..e171b19 100644
Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher.webp and b/app/src/main/res/mipmap-mdpi/ic_launcher.webp differ
diff --git a/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
index 62b611d..a5a6726 100644
Binary files a/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp and b/app/src/main/res/mipmap-mdpi/ic_launcher_round.webp differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_icon.webp b/app/src/main/res/mipmap-xhdpi/ic_icon.webp
new file mode 100644
index 0000000..2f000f1
Binary files /dev/null and b/app/src/main/res/mipmap-xhdpi/ic_icon.webp differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xhdpi/ic_launcher.webp
index 948a307..565f95d 100644
Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher.webp and b/app/src/main/res/mipmap-xhdpi/ic_launcher.webp differ
diff --git a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
index 1b9a695..cb8be68 100644
Binary files a/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp and b/app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_icon.webp b/app/src/main/res/mipmap-xxhdpi/ic_icon.webp
new file mode 100644
index 0000000..65ca728
Binary files /dev/null and b/app/src/main/res/mipmap-xxhdpi/ic_icon.webp differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
index 28d4b77..d8e871a 100644
Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp and b/app/src/main/res/mipmap-xxhdpi/ic_launcher.webp differ
diff --git a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
index 9287f50..f79b9cf 100644
Binary files a/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp and b/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_icon.webp b/app/src/main/res/mipmap-xxxhdpi/ic_icon.webp
new file mode 100644
index 0000000..7123c37
Binary files /dev/null and b/app/src/main/res/mipmap-xxxhdpi/ic_icon.webp differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
index aa7d642..b5f01b2 100644
Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp differ
diff --git a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
index 9126ae3..c291c91 100644
Binary files a/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp and b/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp differ
diff --git a/app/src/main/res/values/ic_launcher_background.xml b/app/src/main/res/values/ic_launcher_background.xml
new file mode 100644
index 0000000..b90d75a
--- /dev/null
+++ b/app/src/main/res/values/ic_launcher_background.xml
@@ -0,0 +1,4 @@
+
+
+ #853DDC
+
\ No newline at end of file
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index 42aa584..2693823 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -1,5 +1,5 @@
[versions]
-agp = "8.9.1"
+agp = "8.9.2"
kotlin = "2.0.21"
coreKtx = "1.16.0"
junit = "4.13.2"