Compare commits
1 Commits
main
...
Novikov-ve
Author | SHA1 | Date | |
---|---|---|---|
c3cc5794a0 |
10
.idea/deploymentTargetSelector.xml
generated
@ -1,10 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="deploymentTargetSelector">
|
|
||||||
<selectionStates>
|
|
||||||
<SelectionState runConfigName="app">
|
|
||||||
<option name="selectionMode" value="DROPDOWN" />
|
|
||||||
</SelectionState>
|
|
||||||
</selectionStates>
|
|
||||||
</component>
|
|
||||||
</project>
|
|
1
.idea/gradle.xml
generated
@ -1,6 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="GradleMigrationSettings" migrationVersion="1" />
|
|
||||||
<component name="GradleSettings">
|
<component name="GradleSettings">
|
||||||
<option name="linkedExternalProjectsSettings">
|
<option name="linkedExternalProjectsSettings">
|
||||||
<GradleProjectSettings>
|
<GradleProjectSettings>
|
||||||
|
1
.idea/misc.xml
generated
@ -1,3 +1,4 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="jbr-21" project-jdk-type="JavaSDK">
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="jbr-21" project-jdk-type="JavaSDK">
|
||||||
|
6
.idea/render.experimental.xml
generated
@ -1,6 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="RenderSettings">
|
|
||||||
<option name="showDecorations" value="true" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
2
.idea/vcs.xml
generated
@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="VcsDirectoryMappings">
|
<component name="VcsDirectoryMappings">
|
||||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
<mapping directory="" vcs="Git" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
@ -12,24 +12,9 @@
|
|||||||
android:supportsRtl="true"
|
android:supportsRtl="true"
|
||||||
android:theme="@style/Theme.TimerT"
|
android:theme="@style/Theme.TimerT"
|
||||||
tools:targetApi="31">
|
tools:targetApi="31">
|
||||||
<activity
|
|
||||||
android:name=".History"
|
|
||||||
android:exported="false" />
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".SettingsActivity"
|
android:name=".SettingsActivity"
|
||||||
android:exported="false" />
|
android:exported="false" />
|
||||||
<activity
|
|
||||||
android:name=".CreatingTraining"
|
|
||||||
android:exported="false" />
|
|
||||||
<activity
|
|
||||||
android:name=".timer"
|
|
||||||
android:exported="false" />
|
|
||||||
<activity
|
|
||||||
android:name=".AllTraining"
|
|
||||||
android:exported="true" />
|
|
||||||
<activity
|
|
||||||
android:name=".AddWorkout"
|
|
||||||
android:exported="true" />
|
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".MainActivity"
|
||||||
android:exported="true">
|
android:exported="true">
|
||||||
|
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 41 KiB |
@ -1,100 +0,0 @@
|
|||||||
package com.example.timert
|
|
||||||
|
|
||||||
import android.app.AlertDialog
|
|
||||||
import android.content.Intent
|
|
||||||
import android.os.Bundle
|
|
||||||
import android.widget.Button
|
|
||||||
import android.widget.EditText
|
|
||||||
import android.widget.ImageView
|
|
||||||
import androidx.activity.enableEdgeToEdge
|
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
|
||||||
import androidx.core.view.ViewCompat
|
|
||||||
import androidx.core.view.WindowInsetsCompat
|
|
||||||
|
|
||||||
class AddWorkout : AppCompatActivity() {
|
|
||||||
private var isSave = false
|
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
|
||||||
super.onCreate(savedInstanceState)
|
|
||||||
enableEdgeToEdge()
|
|
||||||
setContentView(R.layout.activity_add_workout)
|
|
||||||
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 buttonSaveAll: Button = findViewById(R.id.btn_save_all)
|
|
||||||
buttonSaveAll.setOnClickListener {
|
|
||||||
val intent = Intent(this, MainActivity::class.java)
|
|
||||||
startActivity(intent)
|
|
||||||
isSave = true
|
|
||||||
|
|
||||||
}
|
|
||||||
val button_on_main_all: Button = findViewById(R.id.btn_on_main_all)
|
|
||||||
button_on_main_all.setOnClickListener {
|
|
||||||
if (isSave == false) {
|
|
||||||
AlertDialog.Builder(this)
|
|
||||||
.setTitle("Изменения не сохранены")
|
|
||||||
.setMessage("Продолжить без сохранения?")
|
|
||||||
.setPositiveButton("Да") { _, _ ->
|
|
||||||
|
|
||||||
val intent = Intent(this, MainActivity::class.java)
|
|
||||||
startActivity(intent)
|
|
||||||
}
|
|
||||||
.setNegativeButton("Нет") { dialog, _ ->
|
|
||||||
dialog.dismiss()
|
|
||||||
}
|
|
||||||
.show()
|
|
||||||
} else {
|
|
||||||
val intent = Intent(this, MainActivity::class.java)
|
|
||||||
startActivity(intent)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
val button_add: Button = findViewById(R.id.add_workoutadd)
|
|
||||||
button_add.setOnClickListener {
|
|
||||||
val intent = Intent(this, CreatingTraining::class.java)
|
|
||||||
startActivity(intent)
|
|
||||||
}
|
|
||||||
val timeInputRestSetAll: EditText = findViewById(R.id.rest_sets_all)
|
|
||||||
val btnPlusTimeAll: ImageView = findViewById(R.id.add_res_set2)
|
|
||||||
val btnMinusTimeAll: ImageView = findViewById(R.id.del_res_set2)
|
|
||||||
|
|
||||||
val setsInputAll: EditText = findViewById(R.id.numbers_of_sets_all)
|
|
||||||
val btnPlusSetsAll: ImageView = findViewById(R.id.add_set3)
|
|
||||||
val btnMinusSetsAll: ImageView = findViewById(R.id.del_set3)
|
|
||||||
|
|
||||||
val timeInputRest: EditText = findViewById(R.id.rest_workout_all)
|
|
||||||
val btnPlusTimeWor: ImageView = findViewById(R.id.add_res)
|
|
||||||
val btnMinusTimeWor: ImageView = findViewById(R.id.del_res)
|
|
||||||
|
|
||||||
val timeWork: EditText = findViewById(R.id.time_work_all)
|
|
||||||
val Plus: ImageView = findViewById(R.id.add_set)
|
|
||||||
val Minus: ImageView = findViewById(R.id.del_set)
|
|
||||||
|
|
||||||
setupPlusMinus(timeInputRestSetAll, btnPlusTimeAll, btnMinusTimeAll, minValue = 5, maxValue = 600)
|
|
||||||
setupPlusMinus(setsInputAll, btnPlusSetsAll, btnMinusSetsAll, minValue = 1, maxValue = 20)
|
|
||||||
setupPlusMinus(timeInputRest, btnPlusTimeWor, btnMinusTimeWor, minValue = 5, maxValue = 600)
|
|
||||||
setupPlusMinus(timeWork, Plus, Minus, minValue = 5, maxValue = 600)
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
fun setupPlusMinus(
|
|
||||||
editText: EditText,
|
|
||||||
plus: ImageView,
|
|
||||||
minus: ImageView,
|
|
||||||
minValue: Int = 5,
|
|
||||||
maxValue: Int = 600
|
|
||||||
) {
|
|
||||||
plus.setOnClickListener {
|
|
||||||
val current = editText.text.toString().toIntOrNull() ?: minValue
|
|
||||||
val newValue = (current + 1).coerceAtMost(maxValue)
|
|
||||||
editText.setText(newValue.toString())
|
|
||||||
}
|
|
||||||
|
|
||||||
minus.setOnClickListener {
|
|
||||||
val current = editText.text.toString().toIntOrNull() ?: minValue
|
|
||||||
val newValue = (current - 1).coerceAtLeast(minValue)
|
|
||||||
editText.setText(newValue.toString())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,85 +0,0 @@
|
|||||||
package com.example.timert
|
|
||||||
|
|
||||||
import android.app.AlertDialog
|
|
||||||
import android.content.Intent
|
|
||||||
import android.os.Bundle
|
|
||||||
import android.widget.Button
|
|
||||||
import android.widget.EditText
|
|
||||||
import android.widget.ImageView
|
|
||||||
import androidx.activity.enableEdgeToEdge
|
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
|
||||||
import androidx.core.view.ViewCompat
|
|
||||||
import androidx.core.view.WindowInsetsCompat
|
|
||||||
|
|
||||||
class AllTraining : AppCompatActivity() {
|
|
||||||
private var isSave = false
|
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
|
||||||
super.onCreate(savedInstanceState)
|
|
||||||
enableEdgeToEdge()
|
|
||||||
setContentView(R.layout.activity_all_training)
|
|
||||||
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 buttonSaveAll: Button = findViewById(R.id.btn_save_all_vse)
|
|
||||||
buttonSaveAll.setOnClickListener {
|
|
||||||
val intent = Intent(this, CreatingTraining::class.java)
|
|
||||||
startActivity(intent)
|
|
||||||
isSave = true
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
val button_on_main_all: Button = findViewById(R.id.btn_on_main_all_vse)
|
|
||||||
button_on_main_all.setOnClickListener {
|
|
||||||
if (isSave == false) {
|
|
||||||
AlertDialog.Builder(this)
|
|
||||||
.setTitle("Изменения не сохранены")
|
|
||||||
.setMessage("Продолжить без сохранения?")
|
|
||||||
.setPositiveButton("Да") { _, _ ->
|
|
||||||
|
|
||||||
val intent = Intent(this, MainActivity::class.java)
|
|
||||||
startActivity(intent)
|
|
||||||
}
|
|
||||||
.setNegativeButton("Нет") { dialog, _ ->
|
|
||||||
dialog.dismiss()
|
|
||||||
}
|
|
||||||
.show()
|
|
||||||
} else {
|
|
||||||
val intent = Intent(this, MainActivity::class.java)
|
|
||||||
startActivity(intent)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
val timeInputRest: EditText = findViewById(R.id.rest_workout)
|
|
||||||
val btnPlusTime: ImageView = findViewById(R.id.add_res)
|
|
||||||
val btnMinusTime: ImageView = findViewById(R.id.del_res)
|
|
||||||
|
|
||||||
val setsInput: EditText = findViewById(R.id.time_work)
|
|
||||||
val btnPlusSets: ImageView = findViewById(R.id.add_set)
|
|
||||||
val btnMinusSets: ImageView = findViewById(R.id.del_set)
|
|
||||||
|
|
||||||
setupPlusMinus(timeInputRest, btnPlusTime, btnMinusTime, minValue = 5, maxValue = 600)
|
|
||||||
setupPlusMinus(setsInput, btnPlusSets, btnMinusSets, minValue = 5, maxValue = 600)
|
|
||||||
}
|
|
||||||
fun setupPlusMinus(
|
|
||||||
editText: EditText,
|
|
||||||
plus: ImageView,
|
|
||||||
minus: ImageView,
|
|
||||||
minValue: Int = 5,
|
|
||||||
maxValue: Int = 600
|
|
||||||
) {
|
|
||||||
plus.setOnClickListener {
|
|
||||||
val current = editText.text.toString().toIntOrNull() ?: minValue
|
|
||||||
val newValue = (current + 1).coerceAtMost(maxValue)
|
|
||||||
editText.setText(newValue.toString())
|
|
||||||
}
|
|
||||||
|
|
||||||
minus.setOnClickListener {
|
|
||||||
val current = editText.text.toString().toIntOrNull() ?: minValue
|
|
||||||
val newValue = (current - 1).coerceAtLeast(minValue)
|
|
||||||
editText.setText(newValue.toString())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,91 +0,0 @@
|
|||||||
package com.example.timert
|
|
||||||
|
|
||||||
import android.app.AlertDialog
|
|
||||||
import android.content.Intent
|
|
||||||
import android.os.Bundle
|
|
||||||
import android.widget.Button
|
|
||||||
import android.widget.EditText
|
|
||||||
import android.widget.ImageButton
|
|
||||||
import android.widget.ImageView
|
|
||||||
import androidx.activity.enableEdgeToEdge
|
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
|
||||||
import androidx.core.view.ViewCompat
|
|
||||||
import androidx.core.view.WindowInsetsCompat
|
|
||||||
|
|
||||||
class CreatingTraining : AppCompatActivity() {
|
|
||||||
private var isSave = false
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
|
||||||
super.onCreate(savedInstanceState)
|
|
||||||
enableEdgeToEdge()
|
|
||||||
setContentView(R.layout.activity_creating_training)
|
|
||||||
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 buttonSave: Button = findViewById(R.id.btn_save)
|
|
||||||
buttonSave.setOnClickListener {
|
|
||||||
|
|
||||||
isSave=true
|
|
||||||
val intent = Intent(this, MainActivity::class.java)
|
|
||||||
startActivity(intent)
|
|
||||||
|
|
||||||
}
|
|
||||||
val timeInputRest: EditText = findViewById(R.id.rest_sets)
|
|
||||||
val btnPlusTime: ImageView = findViewById(R.id.add_res)
|
|
||||||
val btnMinusTime: ImageView = findViewById(R.id.del_res)
|
|
||||||
|
|
||||||
val setsInput: EditText = findViewById(R.id.numbers_of_sets)
|
|
||||||
val btnPlusSets: ImageView = findViewById(R.id.add_set)
|
|
||||||
val btnMinusSets: ImageView = findViewById(R.id.del_set)
|
|
||||||
|
|
||||||
setupPlusMinus(timeInputRest, btnPlusTime, btnMinusTime, minValue = 5, maxValue = 600)
|
|
||||||
setupPlusMinus(setsInput, btnPlusSets, btnMinusSets, minValue = 1, maxValue = 20)
|
|
||||||
val button_on_main: Button = findViewById(R.id.btn_on_main)
|
|
||||||
button_on_main.setOnClickListener {
|
|
||||||
if(isSave==false){
|
|
||||||
AlertDialog.Builder(this)
|
|
||||||
.setTitle("Изменения не сохранены")
|
|
||||||
.setMessage("Продолжить без сохранения?")
|
|
||||||
.setPositiveButton("Да") { _, _ ->
|
|
||||||
|
|
||||||
val intent = Intent(this, MainActivity::class.java)
|
|
||||||
startActivity(intent)
|
|
||||||
}
|
|
||||||
.setNegativeButton("Нет") { dialog, _ ->
|
|
||||||
dialog.dismiss()
|
|
||||||
}
|
|
||||||
.show()
|
|
||||||
}else{
|
|
||||||
val intent = Intent(this, MainActivity::class.java)
|
|
||||||
startActivity(intent)
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
val button_add: Button = findViewById(R.id.add_workout)
|
|
||||||
button_add.setOnClickListener {
|
|
||||||
val intent = Intent(this, AllTraining::class.java)
|
|
||||||
startActivity(intent)
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
fun setupPlusMinus(
|
|
||||||
editText: EditText,
|
|
||||||
plus: ImageView,
|
|
||||||
minus: ImageView,
|
|
||||||
minValue: Int = 5,
|
|
||||||
maxValue: Int = 600
|
|
||||||
) {
|
|
||||||
plus.setOnClickListener {
|
|
||||||
val current = editText.text.toString().toIntOrNull() ?: minValue
|
|
||||||
val newValue = (current + 1).coerceAtMost(maxValue)
|
|
||||||
editText.setText(newValue.toString())
|
|
||||||
}
|
|
||||||
|
|
||||||
minus.setOnClickListener {
|
|
||||||
val current = editText.text.toString().toIntOrNull() ?: minValue
|
|
||||||
val newValue = (current - 1).coerceAtLeast(minValue)
|
|
||||||
editText.setText(newValue.toString())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -1,27 +0,0 @@
|
|||||||
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
|
|
||||||
import androidx.core.view.WindowInsetsCompat
|
|
||||||
|
|
||||||
class History : AppCompatActivity() {
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
|
||||||
super.onCreate(savedInstanceState)
|
|
||||||
enableEdgeToEdge()
|
|
||||||
setContentView(R.layout.activity_history)
|
|
||||||
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_on_main: Button = findViewById(R.id.btn_on_main)
|
|
||||||
button_on_main.setOnClickListener {
|
|
||||||
val intent = Intent(this, MainActivity::class.java)
|
|
||||||
startActivity(intent)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -2,7 +2,6 @@ package com.example.timert
|
|||||||
|
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.view.View
|
|
||||||
import android.widget.Button
|
import android.widget.Button
|
||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import androidx.activity.enableEdgeToEdge
|
import androidx.activity.enableEdgeToEdge
|
||||||
@ -21,42 +20,29 @@ class MainActivity : AppCompatActivity() {
|
|||||||
insets
|
insets
|
||||||
}
|
}
|
||||||
|
|
||||||
// Кнопки главной формы:
|
|
||||||
val settingsButton: Button = findViewById(R.id.settingsButton)
|
val settingsButton: Button = findViewById(R.id.settingsButton)
|
||||||
settingsButton.setOnClickListener {
|
settingsButton.setOnClickListener {
|
||||||
val intent = Intent(this, SettingsActivity::class.java)
|
val intent = Intent(this, SettingsActivity::class.java)
|
||||||
startActivity(intent)
|
startActivity(intent)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
val startTrainingButton: Button = findViewById(R.id.startTrainingButton)
|
val startTrainingButton: Button = findViewById(R.id.startTrainingButton)
|
||||||
startTrainingButton.setOnClickListener {
|
startTrainingButton.setOnClickListener {
|
||||||
Toast.makeText(this, "Запуск тренировки!", Toast.LENGTH_SHORT).show() // Заглушка
|
Toast.makeText(this, "Запуск тренировки!", Toast.LENGTH_SHORT).show() // Заглушка
|
||||||
//TODO: Intent для запуска Activity тренировки (форма 5)
|
//TODO: Intent для запуска Activity тренировки (форма 5)
|
||||||
val intent = Intent(this, timer::class.java)
|
|
||||||
startActivity(intent)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
val templatesButton: Button = findViewById(R.id.templatesButton)
|
val templatesButton: Button = findViewById(R.id.templatesButton)
|
||||||
templatesButton.setOnClickListener {
|
templatesButton.setOnClickListener {
|
||||||
//Toast.makeText(this, "Открытие шаблонов!", Toast.LENGTH_SHORT).show() // Заглушка
|
Toast.makeText(this, "Открытие шаблонов!", Toast.LENGTH_SHORT).show() // Заглушка
|
||||||
//TODO: Intent для открытия Activity шаблонов (форма 3)
|
//TODO: Intent для открытия Activity шаблонов (форма 3)
|
||||||
val intent = Intent(this, AddWorkout::class.java)
|
|
||||||
startActivity(intent)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
val newTemplateButton: Button = findViewById(R.id.newTemplateButton)
|
val newTemplateButton: Button = findViewById(R.id.newTemplateButton)
|
||||||
newTemplateButton.setOnClickListener {
|
newTemplateButton.setOnClickListener {
|
||||||
//Toast.makeText(this, "Создание нового шаблона!", Toast.LENGTH_SHORT).show() // Заглушка
|
Toast.makeText(this, "Создание нового шаблона!", Toast.LENGTH_SHORT).show() // Заглушка
|
||||||
//TODO: Intent для открытия Activity создания шаблона (форма 7)
|
//TODO: Intent для открытия Activity создания шаблона (форма 3)
|
||||||
val intent = Intent(this, History::class.java)
|
|
||||||
startActivity(intent)
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
val exits: Button = findViewById(R.id.btn_exit)
|
|
||||||
exits.setOnClickListener {
|
|
||||||
finish()
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -1,7 +1,6 @@
|
|||||||
package com.example.timert
|
package com.example.timert
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.Intent
|
|
||||||
import android.content.pm.PackageManager
|
import android.content.pm.PackageManager
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.widget.Switch
|
import android.widget.Switch
|
||||||
@ -17,29 +16,68 @@ class SettingsActivity : AppCompatActivity() {
|
|||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
setContentView(R.layout.activity_settings2)
|
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)
|
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 {
|
developersButton.setOnClickListener {
|
||||||
AlertDialog.Builder(this)
|
AlertDialog.Builder(this)
|
||||||
.setTitle("Разработчики")
|
.setTitle("Разработчики")
|
||||||
.setMessage(HtmlCompat.fromHtml(
|
.setMessage(HtmlCompat.fromHtml(
|
||||||
"<p style='margin-left: 2em;'><b>Программу разработали:</b></p><br>" +
|
"<b>Вятский государственный университет</b><br><br>" + // Дополнительный перенос строки
|
||||||
"<p style='margin-left: 2em;'>Емцова Надежда Александровна</p>" +
|
" Иванов Иван Иванович<br>" +
|
||||||
"<p style='margin-left: 2em;'>Новиков Николай Алексеевич</p>" +
|
" Баркин Марк Анатольевич<br>" +
|
||||||
"<p style='margin-left: 2em;'>Пискун Алёна Викторовна</p>",
|
" Крупницын Альбрехт Абрамов",
|
||||||
HtmlCompat.FROM_HTML_MODE_LEGACY
|
HtmlCompat.FROM_HTML_MODE_LEGACY
|
||||||
))
|
))
|
||||||
.setPositiveButton("ОК", null)
|
.setPositiveButton("ОК", null)
|
||||||
.show()
|
.show()
|
||||||
}
|
}
|
||||||
val on_main: Button = findViewById(R.id.btn_on_main)
|
|
||||||
on_main.setOnClickListener {
|
|
||||||
val intent = Intent(this, MainActivity::class.java)
|
|
||||||
startActivity(intent)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
}
|
@ -1,174 +0,0 @@
|
|||||||
package com.example.timert
|
|
||||||
|
|
||||||
import android.app.AlertDialog
|
|
||||||
import android.content.Intent
|
|
||||||
import android.media.Image
|
|
||||||
import android.os.Bundle
|
|
||||||
import android.os.CountDownTimer
|
|
||||||
import android.widget.Button
|
|
||||||
import android.widget.ImageButton
|
|
||||||
import android.widget.TextView
|
|
||||||
import androidx.activity.enableEdgeToEdge
|
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
|
||||||
import androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
import androidx.core.view.ViewCompat
|
|
||||||
import androidx.core.view.WindowInsetsCompat
|
|
||||||
|
|
||||||
class timer : AppCompatActivity() {
|
|
||||||
private var isPlay = false
|
|
||||||
|
|
||||||
private lateinit var statusText: TextView
|
|
||||||
private lateinit var timerText: TextView
|
|
||||||
private lateinit var statusSet: TextView
|
|
||||||
private lateinit var statusExercise: TextView
|
|
||||||
private var numApproaches = 3
|
|
||||||
private var numExercises = 5
|
|
||||||
private var restBetweenExercises = 30
|
|
||||||
private var restBetweenApproaches = 60
|
|
||||||
private var exerciseDuration = 45 // например, 45 секунд упражнение
|
|
||||||
private var currentTimer: CountDownTimer? = null
|
|
||||||
private var timeLeftInMillis: Long = 0
|
|
||||||
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
|
|
||||||
}
|
|
||||||
statusText = findViewById(R.id.statusText)
|
|
||||||
timerText = findViewById(R.id.timerText)
|
|
||||||
statusSet = findViewById(R.id.number_set)
|
|
||||||
statusExercise = findViewById(R.id.num_exercise)
|
|
||||||
numApproaches = intent.getIntExtra("numApproaches", numApproaches)
|
|
||||||
numExercises = intent.getIntExtra("numExercises", numExercises)
|
|
||||||
restBetweenExercises = intent.getIntExtra("restBetweenExercises", restBetweenExercises)
|
|
||||||
restBetweenApproaches = intent.getIntExtra("restBetweenApproaches", restBetweenApproaches)
|
|
||||||
exerciseDuration = intent.getIntExtra("exerciseDuration", exerciseDuration)
|
|
||||||
|
|
||||||
startTraining()
|
|
||||||
|
|
||||||
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
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
private fun resumeTimer(onFinish: () -> Unit) {
|
|
||||||
currentTimer = object : CountDownTimer(timeLeftInMillis, 1000) {
|
|
||||||
override fun onTick(millisUntilFinished: Long) {
|
|
||||||
timeLeftInMillis = millisUntilFinished
|
|
||||||
timerText.text = "${millisUntilFinished / 1000}"
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onFinish() {
|
|
||||||
onFinish()
|
|
||||||
}
|
|
||||||
}.start()
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun startTraining() {
|
|
||||||
var currentApproach = 1
|
|
||||||
val rootLayout = findViewById<ConstraintLayout>(R.id.main)
|
|
||||||
fun nextApproach() {
|
|
||||||
if (currentApproach > numApproaches) {
|
|
||||||
statusText.text = "Тренировка завершена!"
|
|
||||||
rootLayout.setBackgroundResource(R.drawable.blue_gradient)
|
|
||||||
timerText.text = "00:00"
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
var currentExercise = 1
|
|
||||||
|
|
||||||
fun nextExercise() {
|
|
||||||
if (currentExercise > numExercises) {
|
|
||||||
statusText.text = "Отдых между подходами"
|
|
||||||
rootLayout.setBackgroundResource(R.drawable.green_gradient)
|
|
||||||
startRest(restBetweenApproaches) {
|
|
||||||
currentApproach++
|
|
||||||
nextApproach()
|
|
||||||
}
|
|
||||||
return
|
|
||||||
}
|
|
||||||
rootLayout.setBackgroundResource(R.drawable.gradient_pink)
|
|
||||||
statusText.text="Работа"
|
|
||||||
|
|
||||||
statusExercise.text = "$currentExercise / $numExercises"
|
|
||||||
statusSet.text="$currentApproach"
|
|
||||||
startTimer(exerciseDuration) {
|
|
||||||
statusText.text = "Отдых"
|
|
||||||
rootLayout.setBackgroundResource(R.drawable.green_gradient)
|
|
||||||
startRest(restBetweenExercises) {
|
|
||||||
currentExercise++
|
|
||||||
nextExercise()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
nextExercise()
|
|
||||||
}
|
|
||||||
|
|
||||||
nextApproach()
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun startTimer(seconds: Int, onFinish: () -> Unit) {
|
|
||||||
timeLeftInMillis = seconds * 1000L
|
|
||||||
object : CountDownTimer(seconds * 1000L, 1000) {
|
|
||||||
override fun onTick(millisUntilFinished: Long) {
|
|
||||||
timerText.text = "${millisUntilFinished / 1000}"
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onFinish() {
|
|
||||||
onFinish()
|
|
||||||
}
|
|
||||||
}.start()
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun startRest(seconds: Int, onFinish: () -> Unit) {
|
|
||||||
val rootLayout = findViewById<ConstraintLayout>(R.id.main)
|
|
||||||
rootLayout.setBackgroundResource(R.drawable.green_gradient)
|
|
||||||
object : CountDownTimer(seconds * 1000L, 1000) {
|
|
||||||
override fun onTick(millisUntilFinished: Long) {
|
|
||||||
timerText.text = "${millisUntilFinished / 1000}"
|
|
||||||
statusText.text = "Отдых"
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun onFinish() {
|
|
||||||
onFinish()
|
|
||||||
}
|
|
||||||
}.start()
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
BIN
app/src/main/res/drawable/background_image.jpg
Normal file
After Width: | Height: | Size: 1.3 MiB |
Before Width: | Height: | Size: 4.4 KiB |
Before Width: | Height: | Size: 1.1 MiB |
@ -1,9 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shape
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:shape="rectangle">
|
|
||||||
<gradient
|
|
||||||
android:startColor="@color/colorGradientBlueStart"
|
|
||||||
android:endColor="@color/colorGradientBlueStop"
|
|
||||||
android:angle="270" />
|
|
||||||
</shape>
|
|
@ -1,9 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shape
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:shape="rectangle">
|
|
||||||
<gradient
|
|
||||||
android:startColor="@color/colorGradientPinkStart"
|
|
||||||
android:endColor="@color/colorGradientPinkStop"
|
|
||||||
android:angle="270" />
|
|
||||||
</shape>
|
|
@ -1,9 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shape
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:shape="rectangle">
|
|
||||||
<gradient
|
|
||||||
android:startColor="@color/colorGradientPurpureStart"
|
|
||||||
android:endColor="@color/colorGradientPurpureStop"
|
|
||||||
android:angle="180" />
|
|
||||||
</shape>
|
|
@ -1,9 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shape
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:shape="rectangle">
|
|
||||||
<gradient
|
|
||||||
android:startColor="@color/colorGradientGreenStart"
|
|
||||||
android:endColor="@color/colorGradientGreenStop"
|
|
||||||
android:angle="270" />
|
|
||||||
</shape>
|
|
@ -1,14 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:shape="rectangle">
|
|
||||||
|
|
||||||
|
|
||||||
<gradient
|
|
||||||
android:type="linear"
|
|
||||||
android:startColor="@color/colorGradientGreenStart"
|
|
||||||
android:endColor="@color/colorGradientGreenStop"
|
|
||||||
android:gradientRadius="90" />
|
|
||||||
|
|
||||||
|
|
||||||
<corners android:radius="10dp"/>
|
|
||||||
</shape>
|
|
@ -1,10 +0,0 @@
|
|||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:width="24dp"
|
|
||||||
android:height="24dp"
|
|
||||||
android:viewportWidth="24"
|
|
||||||
android:viewportHeight="24"
|
|
||||||
android:tint="?attr/colorControlNormal">
|
|
||||||
<path
|
|
||||||
android:fillColor="@android:color/white"
|
|
||||||
android:pathData="M19,13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/>
|
|
||||||
</vector>
|
|
@ -1,10 +0,0 @@
|
|||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:width="24dp"
|
|
||||||
android:height="24dp"
|
|
||||||
android:viewportWidth="24"
|
|
||||||
android:viewportHeight="24"
|
|
||||||
android:tint="?attr/colorControlNormal">
|
|
||||||
<path
|
|
||||||
android:fillColor="@android:color/white"
|
|
||||||
android:pathData="M19,13H5v-2h14v2z"/>
|
|
||||||
</vector>
|
|
@ -1,4 +1,4 @@
|
|||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#3D6ADC" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#000000" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp">
|
||||||
|
|
||||||
<path android:fillColor="@android:color/white" android:pathData="M19.14,12.94c0.04,-0.3 0.06,-0.61 0.06,-0.94c0,-0.32 -0.02,-0.64 -0.07,-0.94l2.03,-1.58c0.18,-0.14 0.23,-0.41 0.12,-0.61l-1.92,-3.32c-0.12,-0.22 -0.37,-0.29 -0.59,-0.22l-2.39,0.96c-0.5,-0.38 -1.03,-0.7 -1.62,-0.94L14.4,2.81c-0.04,-0.24 -0.24,-0.41 -0.48,-0.41h-3.84c-0.24,0 -0.43,0.17 -0.47,0.41L9.25,5.35C8.66,5.59 8.12,5.92 7.63,6.29L5.24,5.33c-0.22,-0.08 -0.47,0 -0.59,0.22L2.74,8.87C2.62,9.08 2.66,9.34 2.86,9.48l2.03,1.58C4.84,11.36 4.8,11.69 4.8,12s0.02,0.64 0.07,0.94l-2.03,1.58c-0.18,0.14 -0.23,0.41 -0.12,0.61l1.92,3.32c0.12,0.22 0.37,0.29 0.59,0.22l2.39,-0.96c0.5,0.38 1.03,0.7 1.62,0.94l0.36,2.54c0.05,0.24 0.24,0.41 0.48,0.41h3.84c0.24,0 0.44,-0.17 0.47,-0.41l0.36,-2.54c0.59,-0.24 1.13,-0.56 1.62,-0.94l2.39,0.96c0.22,0.08 0.47,0 0.59,-0.22l1.92,-3.32c0.12,-0.22 0.07,-0.47 -0.12,-0.61L19.14,12.94zM12,15.6c-1.98,0 -3.6,-1.62 -3.6,-3.6s1.62,-3.6 3.6,-3.6s3.6,1.62 3.6,3.6S13.98,15.6 12,15.6z"/>
|
<path android:fillColor="@android:color/white" android:pathData="M19.14,12.94c0.04,-0.3 0.06,-0.61 0.06,-0.94c0,-0.32 -0.02,-0.64 -0.07,-0.94l2.03,-1.58c0.18,-0.14 0.23,-0.41 0.12,-0.61l-1.92,-3.32c-0.12,-0.22 -0.37,-0.29 -0.59,-0.22l-2.39,0.96c-0.5,-0.38 -1.03,-0.7 -1.62,-0.94L14.4,2.81c-0.04,-0.24 -0.24,-0.41 -0.48,-0.41h-3.84c-0.24,0 -0.43,0.17 -0.47,0.41L9.25,5.35C8.66,5.59 8.12,5.92 7.63,6.29L5.24,5.33c-0.22,-0.08 -0.47,0 -0.59,0.22L2.74,8.87C2.62,9.08 2.66,9.34 2.86,9.48l2.03,1.58C4.84,11.36 4.8,11.69 4.8,12s0.02,0.64 0.07,0.94l-2.03,1.58c-0.18,0.14 -0.23,0.41 -0.12,0.61l1.92,3.32c0.12,0.22 0.37,0.29 0.59,0.22l2.39,-0.96c0.5,0.38 1.03,0.7 1.62,0.94l0.36,2.54c0.05,0.24 0.24,0.41 0.48,0.41h3.84c0.24,0 0.44,-0.17 0.47,-0.41l0.36,-2.54c0.59,-0.24 1.13,-0.56 1.62,-0.94l2.39,0.96c0.22,0.08 0.47,0 0.59,-0.22l1.92,-3.32c0.12,-0.22 0.07,-0.47 -0.12,-0.61L19.14,12.94zM12,15.6c-1.98,0 -3.6,-1.62 -3.6,-3.6s1.62,-3.6 3.6,-3.6s3.6,1.62 3.6,3.6S13.98,15.6 12,15.6z"/>
|
||||||
|
|
||||||
|
@ -1,10 +0,0 @@
|
|||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:width="24dp"
|
|
||||||
android:height="24dp"
|
|
||||||
android:viewportWidth="24"
|
|
||||||
android:viewportHeight="24"
|
|
||||||
android:tint="?attr/colorControlNormal">
|
|
||||||
<path
|
|
||||||
android:fillColor="@android:color/white"
|
|
||||||
android:pathData="M6,19h4L10,5L6,5v14zM14,5v14h4L18,5h-4z"/>
|
|
||||||
</vector>
|
|
@ -1,10 +0,0 @@
|
|||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:width="24dp"
|
|
||||||
android:height="24dp"
|
|
||||||
android:viewportWidth="24"
|
|
||||||
android:viewportHeight="24"
|
|
||||||
android:tint="?attr/colorControlNormal">
|
|
||||||
<path
|
|
||||||
android:fillColor="@android:color/white"
|
|
||||||
android:pathData="M8,5v14l11,-7z"/>
|
|
||||||
</vector>
|
|
@ -1,10 +0,0 @@
|
|||||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:width="24dp"
|
|
||||||
android:height="24dp"
|
|
||||||
android:viewportWidth="24"
|
|
||||||
android:viewportHeight="24"
|
|
||||||
android:tint="?attr/colorControlNormal">
|
|
||||||
<path
|
|
||||||
android:fillColor="@android:color/white"
|
|
||||||
android:pathData="M6,6h12v12H6z"/>
|
|
||||||
</vector>
|
|
@ -1,9 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<shape
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
android:shape="rectangle">
|
|
||||||
<gradient
|
|
||||||
android:startColor="@color/colorGradientPinkStart"
|
|
||||||
android:endColor="@color/colorGradientPinkStop"
|
|
||||||
android:angle="270" />
|
|
||||||
</shape>
|
|
@ -1,277 +0,0 @@
|
|||||||
<?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:id="@+id/main"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:background="@drawable/blue_gradient"
|
|
||||||
tools:context=".AddWorkout">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/linearLayout"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="130dp"
|
|
||||||
android:layout_marginTop="25dp"
|
|
||||||
android:orientation="vertical"
|
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/textView2"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Тренировка"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:textSize="34sp" />
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/name_training"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="20dp"
|
|
||||||
android:ems="10"
|
|
||||||
android:inputType="text"
|
|
||||||
android:text="Тренировка 1"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:textSize="20sp" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/setting_training"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="400dp"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:orientation="vertical"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/linearLayout"
|
|
||||||
tools:layout_editor_absoluteX="16dp">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/textView6"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Количество подходов"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:textSize="24sp" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/del_set3"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="37dp"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_weight="1"
|
|
||||||
app:srcCompat="@drawable/ic_remove_24px" />
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/numbers_of_sets_all"
|
|
||||||
android:layout_width="3dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:ems="10"
|
|
||||||
android:gravity="center"
|
|
||||||
android:inputType="number"
|
|
||||||
android:text="1"
|
|
||||||
android:textSize="26sp" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/add_set3"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="37dp"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_weight="1"
|
|
||||||
app:srcCompat="@drawable/ic_add_24px" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/textView8_all2"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Отдых между подходами"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:textSize="24sp" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/del_res_set2"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="37dp"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_weight="1"
|
|
||||||
app:srcCompat="@drawable/ic_remove_24px" />
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/rest_sets_all"
|
|
||||||
android:layout_width="3dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:ems="10"
|
|
||||||
android:gravity="center"
|
|
||||||
android:inputType="number"
|
|
||||||
android:text="5"
|
|
||||||
android:textSize="26sp" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/add_res_set2"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="37dp"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_weight="1"
|
|
||||||
app:srcCompat="@drawable/ic_add_24px" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/textView5"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Время работы"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:textSize="24sp" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:layout_marginBottom="20dp"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/del_set"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="37dp"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_weight="1"
|
|
||||||
app:srcCompat="@drawable/ic_remove_24px" />
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/time_work_all"
|
|
||||||
android:layout_width="3dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:ems="10"
|
|
||||||
android:gravity="center"
|
|
||||||
android:inputType="number"
|
|
||||||
android:text="5"
|
|
||||||
android:textSize="26sp" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/add_set"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="37dp"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_weight="1"
|
|
||||||
app:srcCompat="@drawable/ic_add_24px" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/textView8_all"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Отдых между упражнениями"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:textSize="24sp" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/del_res"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="37dp"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_weight="1"
|
|
||||||
app:srcCompat="@drawable/ic_remove_24px" />
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/rest_workout_all"
|
|
||||||
android:layout_width="3dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:ems="10"
|
|
||||||
android:gravity="center"
|
|
||||||
android:inputType="number"
|
|
||||||
android:text="5"
|
|
||||||
android:textSize="26sp" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/add_res"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="37dp"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_weight="1"
|
|
||||||
app:srcCompat="@drawable/ic_add_24px" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/setting_training"
|
|
||||||
tools:layout_editor_absoluteX="0dp">
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/add_workoutadd"
|
|
||||||
android:layout_width="208dp"
|
|
||||||
android:layout_height="50dp"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:background="@drawable/green_rectangle"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="Выбор упражнений"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:textSize="16sp" />
|
|
||||||
</FrameLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:layout_marginBottom="35dp"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent">
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/btn_on_main_all"
|
|
||||||
android:layout_width="150dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_marginLeft="20dp"
|
|
||||||
android:layout_marginRight="20dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:background="@drawable/gradient_purpure"
|
|
||||||
android:text="на главную"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:textColor="@color/white" />
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/btn_save_all"
|
|
||||||
android:layout_width="150dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_marginLeft="20dp"
|
|
||||||
android:layout_marginRight="20dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:background="@drawable/gradient_purpure"
|
|
||||||
android:text="Сохранить"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:textColor="@color/white" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -1,174 +0,0 @@
|
|||||||
<?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:id="@+id/main"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:background="@drawable/gradient_pink"
|
|
||||||
tools:context=".AllTraining">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/linearLayout"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="130dp"
|
|
||||||
android:layout_marginTop="25dp"
|
|
||||||
android:orientation="vertical"
|
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/textView2"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Добавить упражнение"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:textSize="34sp" />
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/name_training"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="20dp"
|
|
||||||
android:ems="10"
|
|
||||||
android:inputType="text"
|
|
||||||
android:text="Упражнение 1"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:textSize="20sp" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/setting_training"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="250dp"
|
|
||||||
android:layout_marginTop="37dp"
|
|
||||||
android:orientation="vertical"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/linearLayout"
|
|
||||||
tools:layout_editor_absoluteX="16dp">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/textView3"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Время работы"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:textSize="24sp" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginBottom="20dp"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/del_set"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="37dp"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_weight="1"
|
|
||||||
app:srcCompat="@drawable/ic_remove_24px" />
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/time_work"
|
|
||||||
android:layout_width="3dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:ems="10"
|
|
||||||
android:gravity="center"
|
|
||||||
android:inputType="number"
|
|
||||||
android:text="5"
|
|
||||||
android:textSize="26sp" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/add_set"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="37dp"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_weight="1"
|
|
||||||
app:srcCompat="@drawable/ic_add_24px" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/textView8_all"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Отдых между упражнениями"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:textSize="24sp" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="95dp"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/del_res"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="37dp"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_weight="1"
|
|
||||||
app:srcCompat="@drawable/ic_remove_24px" />
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/rest_workout"
|
|
||||||
android:layout_width="3dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:ems="10"
|
|
||||||
android:gravity="center"
|
|
||||||
android:inputType="number"
|
|
||||||
android:text="5"
|
|
||||||
android:textSize="26sp" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/add_res"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="37dp"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_weight="1"
|
|
||||||
app:srcCompat="@drawable/ic_add_24px" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:layout_marginBottom="35dp"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
tools:layout_editor_absoluteX="7dp">
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/btn_on_main_all_vse"
|
|
||||||
android:layout_width="150dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_marginLeft="20dp"
|
|
||||||
android:layout_marginRight="20dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:background="@drawable/gradient_purpure"
|
|
||||||
android:text="на главную"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
tools:layout_editor_absoluteX="16dp"
|
|
||||||
tools:layout_editor_absoluteY="653dp" />
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/btn_save_all_vse"
|
|
||||||
android:layout_width="150dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_marginLeft="20dp"
|
|
||||||
android:layout_marginRight="20dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:background="@drawable/gradient_purpure"
|
|
||||||
android:text="Сохранить"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
tools:layout_editor_absoluteX="245dp"
|
|
||||||
tools:layout_editor_absoluteY="653dp" />
|
|
||||||
</LinearLayout>
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -1,193 +0,0 @@
|
|||||||
<?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:id="@+id/main"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:background="@drawable/blue_gradient"
|
|
||||||
tools:context=".CreatingTraining">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/linearLayout"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="130dp"
|
|
||||||
android:layout_marginTop="25dp"
|
|
||||||
android:orientation="vertical"
|
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/textView2"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Тренировка"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:textSize="34sp" />
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/name_training"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="20dp"
|
|
||||||
android:ems="10"
|
|
||||||
android:inputType="text"
|
|
||||||
android:text="Тренировка 1"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:textSize="20sp" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/setting_training"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="220dp"
|
|
||||||
android:layout_marginTop="37dp"
|
|
||||||
android:orientation="vertical"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/linearLayout"
|
|
||||||
tools:layout_editor_absoluteX="16dp">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/textView5"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Количество подходов"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:textSize="24sp" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginBottom="20dp"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/del_set"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="37dp"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_weight="1"
|
|
||||||
app:srcCompat="@drawable/ic_remove_24px" />
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/numbers_of_sets"
|
|
||||||
android:layout_width="3dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:ems="10"
|
|
||||||
android:gravity="center"
|
|
||||||
android:inputType="number"
|
|
||||||
android:text="1"
|
|
||||||
android:textSize="26sp" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/add_set"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="37dp"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_weight="1"
|
|
||||||
app:srcCompat="@drawable/ic_add_24px" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/textView8"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:text="Отдых между подходами"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:textSize="24sp" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/del_res"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="37dp"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_weight="1"
|
|
||||||
app:srcCompat="@drawable/ic_remove_24px" />
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/rest_sets"
|
|
||||||
android:layout_width="3dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:ems="10"
|
|
||||||
android:gravity="center"
|
|
||||||
android:inputType="number"
|
|
||||||
android:text="5"
|
|
||||||
android:textSize="26sp" />
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:id="@+id/add_res"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="37dp"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_weight="1"
|
|
||||||
app:srcCompat="@drawable/ic_add_24px" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:layout_marginTop="19dp"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/setting_training"
|
|
||||||
tools:layout_editor_absoluteX="0dp">
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/add_workout"
|
|
||||||
android:layout_width="176dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:background="@drawable/green_rectangle"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="+ упражнение"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:textColor="@color/white"
|
|
||||||
android:textSize="16sp" />
|
|
||||||
</FrameLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:layout_marginBottom="35dp"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent">
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/btn_on_main"
|
|
||||||
android:layout_width="150dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_marginLeft="20dp"
|
|
||||||
android:layout_marginRight="20dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:background="@drawable/gradient_purpure"
|
|
||||||
android:text="на главную"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:textColor="@color/white" />
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/btn_save"
|
|
||||||
android:layout_width="150dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_marginLeft="20dp"
|
|
||||||
android:layout_marginRight="20dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:background="@drawable/gradient_purpure"
|
|
||||||
android:text="Сохранить"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:textColor="@color/white" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -1,57 +0,0 @@
|
|||||||
<?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:id="@+id/main"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:background="@drawable/gradient_purpure"
|
|
||||||
tools:context=".History">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/textView4"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="30dp"
|
|
||||||
android:text="История тренировок"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:textSize="34sp"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:layout_marginBottom="35dp"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent">
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/btn_on_main"
|
|
||||||
android:layout_width="150dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_marginLeft="20dp"
|
|
||||||
android:layout_marginRight="20dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:background="@drawable/green_gradient"
|
|
||||||
android:text="на главную"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:textColor="@color/white" />
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/btn_save"
|
|
||||||
android:layout_width="150dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:layout_marginLeft="20dp"
|
|
||||||
android:layout_marginRight="20dp"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:background="@drawable/green_gradient"
|
|
||||||
android:text="Выбрать"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:textColor="@color/white" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -8,29 +8,26 @@
|
|||||||
tools:context=".MainActivity">
|
tools:context=".MainActivity">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/imageView"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:scaleType="centerCrop"
|
android:scaleType="centerCrop"
|
||||||
android:src="@drawable/background_imagemain"
|
android:src="@drawable/background_image"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="0.0"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
app:layout_constraintVertical_bias="0.0" />
|
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/settingsButton"
|
android:id="@+id/settingsButton"
|
||||||
android:layout_width="56dp"
|
android:layout_width="48dp"
|
||||||
android:layout_height="56dp"
|
android:layout_height="48dp"
|
||||||
|
android:background="@drawable/ic_settings"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:layout_marginEnd="16dp"
|
android:layout_marginEnd="16dp"
|
||||||
android:background="@android:drawable/ic_menu_info_details"
|
|
||||||
android:backgroundTint="@color/black"
|
|
||||||
android:contentDescription="Настройки"
|
android:contentDescription="Настройки"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
android:backgroundTint="@android:color/transparent" />
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<androidx.cardview.widget.CardView
|
<androidx.cardview.widget.CardView
|
||||||
android:id="@+id/startTrainingCardView"
|
android:id="@+id/startTrainingCardView"
|
||||||
@ -72,7 +69,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@android:color/transparent"
|
android:background="@android:color/transparent"
|
||||||
android:text="Редактировать тренировку"
|
android:text="Шаблоны"
|
||||||
android:textColor="@android:color/white" />
|
android:textColor="@android:color/white" />
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
@ -94,30 +91,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@android:color/transparent"
|
android:background="@android:color/transparent"
|
||||||
android:text="История тренировок"
|
android:text="Новый шаблон"
|
||||||
android:textColor="@android:color/white" />
|
|
||||||
|
|
||||||
</androidx.cardview.widget.CardView>
|
|
||||||
|
|
||||||
<androidx.cardview.widget.CardView
|
|
||||||
android:id="@+id/newTemplateCardView1"
|
|
||||||
android:layout_width="350dp"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginStart="32dp"
|
|
||||||
android:layout_marginTop="100dp"
|
|
||||||
android:layout_marginEnd="32dp"
|
|
||||||
app:cardBackgroundColor="#80000000"
|
|
||||||
app:cardCornerRadius="8dp"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/templatesCardView">
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/btn_exit"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="48dp"
|
|
||||||
android:background="@android:color/transparent"
|
|
||||||
android:text="Закрыть приложение"
|
|
||||||
android:textColor="@android:color/white" />
|
android:textColor="@android:color/white" />
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
|
@ -1,106 +1,64 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
<LinearLayout 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_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
android:padding="16dp"
|
android:padding="16dp">
|
||||||
android:background="@drawable/background_image2"> <!-- Добавили background -->
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/about_progr_layout"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="450dp"
|
|
||||||
android:layout_marginTop="35dp"
|
|
||||||
android:orientation="vertical"
|
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
|
||||||
tools:layout_editor_absoluteX="0dp">
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center"
|
android:text="Настройки"
|
||||||
android:layout_marginBottom="16dp"
|
|
||||||
android:text="О программе"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:textSize="24sp"
|
android:textSize="24sp"
|
||||||
android:textStyle="bold" />
|
android:textStyle="bold"
|
||||||
|
android:layout_marginBottom="16dp"/>
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:layout_width="match_parent"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="8dp"
|
android:text="Таймер для тренировок"
|
||||||
android:text="Название приложения: Таймер для тренировок"
|
android:textSize="18sp"
|
||||||
android:textSize="18sp" />
|
android:layout_marginBottom="8dp"/>
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/textView7"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginBottom="8dp"
|
|
||||||
android:text="Данное приложение поможет пользователю в организации своих тренировок."
|
|
||||||
android:textSize="18sp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/textView9"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginBottom="8dp"
|
|
||||||
android:text="Оно поможет задавать количество подходов и упражнений, устанавливать время работы и отдыха, запускать последние 3 тренировки."
|
|
||||||
android:textSize="18sp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/textView12"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginBottom="8dp"
|
|
||||||
android:text="Можно задавать как интервалы для всех упражнений, так и для каждого отдельно, добавляя названия упражнений."
|
|
||||||
android:textSize="18sp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/versionTextView2"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginBottom="16dp"
|
|
||||||
android:text="При возникновении проблем обращаться на почту: stud179277@vyatsu.ru" />
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/versionTextView"
|
android:id="@+id/versionTextView"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="16dp"
|
android:text="Версия: 1.0"
|
||||||
android:text="Версия: 1.0" />
|
android:layout_marginBottom="16dp"/>
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/btn_layout"
|
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="100dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginBottom="16dp"
|
android:orientation="horizontal"
|
||||||
android:orientation="vertical"
|
android:gravity="center_vertical"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
android:layout_marginBottom="8dp">
|
||||||
tools:layout_editor_absoluteX="0dp">
|
|
||||||
|
<TextView
|
||||||
|
android:layout_width="0dp"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_weight="1"
|
||||||
|
android:text="Темная тема"
|
||||||
|
android:textSize="16sp"/>
|
||||||
|
|
||||||
|
<Switch
|
||||||
|
android:id="@+id/darkModeSwitch"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"/>
|
||||||
|
|
||||||
|
</LinearLayout>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/aboutButton"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:text="О программе"
|
||||||
|
android:layout_marginBottom="8dp"/>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:id="@+id/developersButton"
|
android:id="@+id/developersButton"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@drawable/blue_gradient"
|
android:text="Разработчики"/>
|
||||||
android:text="Разработчики" />
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/btn_on_main"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
android:background="@drawable/blue_gradient"
|
|
||||||
android:text="На главную" />
|
|
||||||
</LinearLayout>
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
@ -1,137 +0,0 @@
|
|||||||
<?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:id="@+id/main"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:background="@drawable/gradient_pink"
|
|
||||||
tools:context=".timer">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/textView"
|
|
||||||
android:layout_width="409dp"
|
|
||||||
android:layout_height="57dp"
|
|
||||||
android:layout_marginTop="50dp"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="Тренировка"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:textColor="#040405"
|
|
||||||
android:textSize="34sp"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintHorizontal_bias="0.0"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/actions"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:layout_marginBottom="100dp"
|
|
||||||
android:gravity="center"
|
|
||||||
android:orientation="horizontal"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
tools:layout_editor_absoluteX="16dp">
|
|
||||||
|
|
||||||
<ImageButton
|
|
||||||
android:id="@+id/play"
|
|
||||||
android:layout_width="60dp"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:background="#00FFFFFF"
|
|
||||||
app:srcCompat="@drawable/icon_play" />
|
|
||||||
|
|
||||||
<ImageButton
|
|
||||||
android:id="@+id/stop"
|
|
||||||
android:layout_width="60dp"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:background="#00FFFFFF"
|
|
||||||
app:srcCompat="@drawable/icon_stop" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/main_timer"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="360dp"
|
|
||||||
android:layout_marginBottom="99dp"
|
|
||||||
android:gravity="center"
|
|
||||||
android:orientation="vertical"
|
|
||||||
app:layout_constraintBottom_toTopOf="@+id/actions"
|
|
||||||
tools:layout_editor_absoluteX="0dp">
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="54dp"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/textView10"
|
|
||||||
android:layout_width="548dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="Подход № "
|
|
||||||
android:textAlignment="textEnd"
|
|
||||||
android:textColor="@color/black"
|
|
||||||
android:textSize="34sp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/number_set"
|
|
||||||
android:layout_width="400dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text=" 1"
|
|
||||||
android:textAlignment="viewStart"
|
|
||||||
android:textColor="@color/black"
|
|
||||||
android:textSize="34sp" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="71dp"
|
|
||||||
android:orientation="horizontal">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/textView11"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:text="Упражнение "
|
|
||||||
android:textAlignment="textEnd"
|
|
||||||
android:textColor="@color/black"
|
|
||||||
android:textSize="34sp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/num_exercise"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_weight="1"
|
|
||||||
android:text=" 1"
|
|
||||||
android:textAlignment="viewStart"
|
|
||||||
android:textColor="@color/black"
|
|
||||||
android:textSize="34sp" />
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/timerText"
|
|
||||||
android:layout_width="163dp"
|
|
||||||
android:layout_height="153dp"
|
|
||||||
android:layout_gravity="center"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="00:00"
|
|
||||||
android:textColor="#FFFFFF"
|
|
||||||
android:textSize="60sp" />
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/statusText"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="70dp"
|
|
||||||
android:gravity="center"
|
|
||||||
android:text="Работа"
|
|
||||||
android:textAlignment="center"
|
|
||||||
android:textColor="@color/black"
|
|
||||||
android:textSize="34sp" />
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<background android:drawable="@color/ic_launcher_background"/>
|
<background android:drawable="@color/ic_launcher_background"/>
|
||||||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
<foreground android:drawable="@mipmap/ic_icon"/>
|
||||||
</adaptive-icon>
|
</adaptive-icon>
|
@ -1,5 +1,5 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<background android:drawable="@color/ic_launcher_background"/>
|
<background android:drawable="@color/ic_launcher_background"/>
|
||||||
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
|
<foreground android:drawable="@mipmap/ic_icon"/>
|
||||||
</adaptive-icon>
|
</adaptive-icon>
|
BIN
app/src/main/res/mipmap-hdpi/ic_icon.webp
Normal file
After Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 2.7 KiB |
Before Width: | Height: | Size: 3.8 KiB |
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.8 KiB |
BIN
app/src/main/res/mipmap-mdpi/ic_icon.webp
Normal file
After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 2.0 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.1 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_icon.webp
Normal file
After Width: | Height: | Size: 4.9 KiB |
Before Width: | Height: | Size: 3.7 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 4.8 KiB |
Before Width: | Height: | Size: 6.6 KiB After Width: | Height: | Size: 6.5 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_icon.webp
Normal file
After Width: | Height: | Size: 7.5 KiB |
Before Width: | Height: | Size: 5.4 KiB After Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 7.7 KiB |
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_icon.webp
Normal file
After Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 7.1 KiB After Width: | Height: | Size: 6.9 KiB |
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
@ -2,17 +2,4 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<color name="black">#FF000000</color>
|
<color name="black">#FF000000</color>
|
||||||
<color name="white">#FFFFFFFF</color>
|
<color name="white">#FFFFFFFF</color>
|
||||||
|
|
||||||
<color name="colorGradientPinkStart">#F54EA2</color>
|
|
||||||
<color name="colorGradientPinkStop">#FF7676</color>
|
|
||||||
|
|
||||||
<color name="colorGradientGreenStart">#42E695</color>
|
|
||||||
<color name="colorGradientGreenStop">#3BB2B8</color>
|
|
||||||
|
|
||||||
<color name="colorGradientBlueStart">#17EAD9</color>
|
|
||||||
<color name="colorGradientBlueStop">#6078EA</color>
|
|
||||||
|
|
||||||
<color name="colorGradientPurpureStart">#7C37D3</color>
|
|
||||||
<color name="colorGradientPurpureStop">#916AD3</color>
|
|
||||||
|
|
||||||
</resources>
|
</resources>
|
@ -1,4 +1,4 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
<color name="ic_launcher_background">#943DDC</color>
|
<color name="ic_launcher_background">#853DDC</color>
|
||||||
</resources>
|
</resources>
|
@ -1,4 +1,3 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<string name="app_name">Timer</string>
|
<string name="app_name">TimerT</string>
|
||||||
<string name="upper_start">START</string>
|
|
||||||
</resources>
|
</resources>
|
@ -5,6 +5,5 @@
|
|||||||
<!-- <item name="colorPrimary">@color/my_light_primary</item> -->
|
<!-- <item name="colorPrimary">@color/my_light_primary</item> -->
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style name="Theme.TimerT" parent="Base.Theme.TimerT" />
|
||||||
<style name="Theme.TimerT" parent="Theme.AppCompat.Light.NoActionBar" />
|
|
||||||
</resources>
|
</resources>
|