Compare commits
	
		
			2 Commits
		
	
	
		
			0642d1edd2
			...
			a2709d0813
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| a2709d0813 | |||
| ca52cec700 | 
							
								
								
									
										3
									
								
								.idea/.gitignore
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										3
									
								
								.idea/.gitignore
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @ -0,0 +1,3 @@ | |||||||
|  | # Default ignored files | ||||||
|  | /shelf/ | ||||||
|  | /workspace.xml | ||||||
							
								
								
									
										6
									
								
								.idea/AndroidProjectSystem.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								.idea/AndroidProjectSystem.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							| @ -0,0 +1,6 @@ | |||||||
|  | <?xml version="1.0" encoding="UTF-8"?> | ||||||
|  | <project version="4"> | ||||||
|  |   <component name="AndroidProjectSystem"> | ||||||
|  |     <option name="providerId" value="com.android.tools.idea.GradleProjectSystem" /> | ||||||
|  |   </component> | ||||||
|  | </project> | ||||||
							
								
								
									
										6
									
								
								.idea/compiler.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								.idea/compiler.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							| @ -0,0 +1,6 @@ | |||||||
|  | <?xml version="1.0" encoding="UTF-8"?> | ||||||
|  | <project version="4"> | ||||||
|  |   <component name="CompilerConfiguration"> | ||||||
|  |     <bytecodeTargetLevel target="21" /> | ||||||
|  |   </component> | ||||||
|  | </project> | ||||||
							
								
								
									
										10
									
								
								.idea/deploymentTargetSelector.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								.idea/deploymentTargetSelector.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							| @ -0,0 +1,10 @@ | |||||||
|  | <?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> | ||||||
							
								
								
									
										19
									
								
								.idea/gradle.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								.idea/gradle.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							| @ -0,0 +1,19 @@ | |||||||
|  | <?xml version="1.0" encoding="UTF-8"?> | ||||||
|  | <project version="4"> | ||||||
|  |   <component name="GradleMigrationSettings" migrationVersion="1" /> | ||||||
|  |   <component name="GradleSettings"> | ||||||
|  |     <option name="linkedExternalProjectsSettings"> | ||||||
|  |       <GradleProjectSettings> | ||||||
|  |         <option name="testRunner" value="CHOOSE_PER_TEST" /> | ||||||
|  |         <option name="externalProjectPath" value="$PROJECT_DIR$" /> | ||||||
|  |         <option name="gradleJvm" value="#GRADLE_LOCAL_JAVA_HOME" /> | ||||||
|  |         <option name="modules"> | ||||||
|  |           <set> | ||||||
|  |             <option value="$PROJECT_DIR$" /> | ||||||
|  |             <option value="$PROJECT_DIR$/app" /> | ||||||
|  |           </set> | ||||||
|  |         </option> | ||||||
|  |       </GradleProjectSettings> | ||||||
|  |     </option> | ||||||
|  |   </component> | ||||||
|  | </project> | ||||||
							
								
								
									
										6
									
								
								.idea/kotlinc.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								.idea/kotlinc.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							| @ -0,0 +1,6 @@ | |||||||
|  | <?xml version="1.0" encoding="UTF-8"?> | ||||||
|  | <project version="4"> | ||||||
|  |   <component name="KotlinJpsPluginSettings"> | ||||||
|  |     <option name="version" value="2.0.21" /> | ||||||
|  |   </component> | ||||||
|  | </project> | ||||||
							
								
								
									
										10
									
								
								.idea/migrations.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								.idea/migrations.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							| @ -0,0 +1,10 @@ | |||||||
|  | <?xml version="1.0" encoding="UTF-8"?> | ||||||
|  | <project version="4"> | ||||||
|  |   <component name="ProjectMigrations"> | ||||||
|  |     <option name="MigrateToGradleLocalJavaHome"> | ||||||
|  |       <set> | ||||||
|  |         <option value="$PROJECT_DIR$" /> | ||||||
|  |       </set> | ||||||
|  |     </option> | ||||||
|  |   </component> | ||||||
|  | </project> | ||||||
							
								
								
									
										10
									
								
								.idea/misc.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								.idea/misc.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							| @ -0,0 +1,10 @@ | |||||||
|  | <?xml version="1.0" encoding="UTF-8"?> | ||||||
|  | <project version="4"> | ||||||
|  |   <component name="ExternalStorageConfigurationManager" enabled="true" /> | ||||||
|  |   <component name="ProjectRootManager" version="2" languageLevel="JDK_21" default="true" project-jdk-name="jbr-21" project-jdk-type="JavaSDK"> | ||||||
|  |     <output url="file://$PROJECT_DIR$/build/classes" /> | ||||||
|  |   </component> | ||||||
|  |   <component name="ProjectType"> | ||||||
|  |     <option name="id" value="Android" /> | ||||||
|  |   </component> | ||||||
|  | </project> | ||||||
							
								
								
									
										6
									
								
								.idea/render.experimental.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								.idea/render.experimental.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							| @ -0,0 +1,6 @@ | |||||||
|  | <?xml version="1.0" encoding="UTF-8"?> | ||||||
|  | <project version="4"> | ||||||
|  |   <component name="RenderSettings"> | ||||||
|  |     <option name="showDecorations" value="true" /> | ||||||
|  |   </component> | ||||||
|  | </project> | ||||||
							
								
								
									
										17
									
								
								.idea/runConfigurations.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								.idea/runConfigurations.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							| @ -0,0 +1,17 @@ | |||||||
|  | <?xml version="1.0" encoding="UTF-8"?> | ||||||
|  | <project version="4"> | ||||||
|  |   <component name="RunConfigurationProducerService"> | ||||||
|  |     <option name="ignoredProducers"> | ||||||
|  |       <set> | ||||||
|  |         <option value="com.intellij.execution.junit.AbstractAllInDirectoryConfigurationProducer" /> | ||||||
|  |         <option value="com.intellij.execution.junit.AllInPackageConfigurationProducer" /> | ||||||
|  |         <option value="com.intellij.execution.junit.PatternConfigurationProducer" /> | ||||||
|  |         <option value="com.intellij.execution.junit.TestInClassConfigurationProducer" /> | ||||||
|  |         <option value="com.intellij.execution.junit.UniqueIdConfigurationProducer" /> | ||||||
|  |         <option value="com.intellij.execution.junit.testDiscovery.JUnitTestDiscoveryConfigurationProducer" /> | ||||||
|  |         <option value="org.jetbrains.kotlin.idea.junit.KotlinJUnitRunConfigurationProducer" /> | ||||||
|  |         <option value="org.jetbrains.kotlin.idea.junit.KotlinPatternConfigurationProducer" /> | ||||||
|  |       </set> | ||||||
|  |     </option> | ||||||
|  |   </component> | ||||||
|  | </project> | ||||||
							
								
								
									
										6
									
								
								.idea/vcs.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								.idea/vcs.xml
									
									
									
										generated
									
									
									
										Normal file
									
								
							| @ -0,0 +1,6 @@ | |||||||
|  | <?xml version="1.0" encoding="UTF-8"?> | ||||||
|  | <project version="4"> | ||||||
|  |   <component name="VcsDirectoryMappings"> | ||||||
|  |     <mapping directory="$PROJECT_DIR$" vcs="Git" /> | ||||||
|  |   </component> | ||||||
|  | </project> | ||||||
| @ -12,6 +12,12 @@ | |||||||
|         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=".CreatingTraining" | ||||||
|  |             android:exported="false" /> | ||||||
|  |         <activity | ||||||
|  |             android:name=".timer" | ||||||
|  |             android:exported="false" /> | ||||||
|         <activity |         <activity | ||||||
|             android:name=".MainActivity" |             android:name=".MainActivity" | ||||||
|             android:exported="true"> |             android:exported="true"> | ||||||
|  | |||||||
							
								
								
									
										53
									
								
								app/src/main/java/com/example/timert/CreatingTraining.kt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										53
									
								
								app/src/main/java/com/example/timert/CreatingTraining.kt
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,53 @@ | |||||||
|  | package com.example.timert | ||||||
|  | 
 | ||||||
|  | import android.app.AlertDialog | ||||||
|  | import android.content.Intent | ||||||
|  | import android.os.Bundle | ||||||
|  | import android.widget.Button | ||||||
|  | import android.widget.ImageButton | ||||||
|  | import androidx.activity.enableEdgeToEdge | ||||||
|  | import androidx.appcompat.app.AppCompatActivity | ||||||
|  | import androidx.core.view.ViewCompat | ||||||
|  | import androidx.core.view.WindowInsetsCompat | ||||||
|  | 
 | ||||||
|  | class 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 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) | ||||||
|  | 
 | ||||||
|  |             } | ||||||
|  |             } | ||||||
|  | 
 | ||||||
|  |     } | ||||||
|  | } | ||||||
| @ -1,6 +1,8 @@ | |||||||
| package com.example.timert | package com.example.timert | ||||||
| 
 | 
 | ||||||
|  | import android.content.Intent | ||||||
| import android.os.Bundle | import android.os.Bundle | ||||||
|  | import android.widget.Button | ||||||
| import androidx.activity.enableEdgeToEdge | import androidx.activity.enableEdgeToEdge | ||||||
| import androidx.appcompat.app.AppCompatActivity | import androidx.appcompat.app.AppCompatActivity | ||||||
| import androidx.core.view.ViewCompat | import androidx.core.view.ViewCompat | ||||||
| @ -16,5 +18,18 @@ class MainActivity : AppCompatActivity() { | |||||||
|             v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom) |             v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom) | ||||||
|             insets |             insets | ||||||
|         } |         } | ||||||
|  |         var button: Button = findViewById(R.id.button1) | ||||||
|  | 
 | ||||||
|  |         button.setOnClickListener{ | ||||||
|  |             val intent = Intent(this,timer::class.java) | ||||||
|  |             startActivity(intent) | ||||||
|         } |         } | ||||||
|  |         var button2: Button = findViewById(R.id.button2) | ||||||
|  | 
 | ||||||
|  |         button2.setOnClickListener{ | ||||||
|  |             val intent = Intent(this,CreatingTraining::class.java) | ||||||
|  |             startActivity(intent) | ||||||
|  |         } | ||||||
|  |     } | ||||||
|  | 
 | ||||||
| } | } | ||||||
							
								
								
									
										62
									
								
								app/src/main/java/com/example/timert/timer.kt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										62
									
								
								app/src/main/java/com/example/timert/timer.kt
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,62 @@ | |||||||
|  | package com.example.timert | ||||||
|  | 
 | ||||||
|  | import android.app.AlertDialog | ||||||
|  | import android.content.Intent | ||||||
|  | import android.media.Image | ||||||
|  | import android.os.Bundle | ||||||
|  | import android.widget.Button | ||||||
|  | import android.widget.ImageButton | ||||||
|  | import androidx.activity.enableEdgeToEdge | ||||||
|  | import androidx.appcompat.app.AppCompatActivity | ||||||
|  | import androidx.core.view.ViewCompat | ||||||
|  | import androidx.core.view.WindowInsetsCompat | ||||||
|  | 
 | ||||||
|  | class timer : AppCompatActivity() { | ||||||
|  |     private var isPlay = false | ||||||
|  |     override fun onCreate(savedInstanceState: Bundle?) { | ||||||
|  |         super.onCreate(savedInstanceState) | ||||||
|  |         enableEdgeToEdge() | ||||||
|  |         setContentView(R.layout.activity_timer) | ||||||
|  |         ViewCompat.setOnApplyWindowInsetsListener(findViewById(R.id.main)) { v, insets -> | ||||||
|  |             val systemBars = insets.getInsets(WindowInsetsCompat.Type.systemBars()) | ||||||
|  |             v.setPadding(systemBars.left, systemBars.top, systemBars.right, systemBars.bottom) | ||||||
|  |             insets | ||||||
|  |         } | ||||||
|  |         val button: ImageButton = findViewById(R.id.stop) | ||||||
|  |         button.setOnClickListener { | ||||||
|  |             AlertDialog.Builder(this) | ||||||
|  |                 .setTitle("Сброс таймера") | ||||||
|  |                 .setMessage("Закрыть таймер и перейти на главную страницу?") | ||||||
|  |                 .setPositiveButton("Да") { _, _ -> | ||||||
|  | 
 | ||||||
|  |                     val intent = Intent(this, MainActivity::class.java) | ||||||
|  |                     startActivity(intent) | ||||||
|  |                 } | ||||||
|  |                 .setNegativeButton("Нет") { dialog, _ -> | ||||||
|  |                     dialog.dismiss() | ||||||
|  |                 } | ||||||
|  |                 .show() | ||||||
|  |         } | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |             val pauseButton: ImageButton = findViewById(R.id.play) | ||||||
|  | 
 | ||||||
|  |             pauseButton.setOnClickListener { | ||||||
|  |                 if (isPlay) { | ||||||
|  | 
 | ||||||
|  |                     pauseButton.setImageResource(R.drawable.icon_play) | ||||||
|  |                     // здесь ещё можно возобновить таймер | ||||||
|  |                 } else { | ||||||
|  | 
 | ||||||
|  |                     pauseButton.setImageResource(R.drawable.icon_pause) | ||||||
|  |                     // здесь можно остановить таймер | ||||||
|  |                 } | ||||||
|  |                 isPlay = !isPlay | ||||||
|  |             } | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  | 
 | ||||||
|  |     } | ||||||
|  | 
 | ||||||
|  | } | ||||||
							
								
								
									
										9
									
								
								app/src/main/res/drawable/blue_gradient.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								app/src/main/res/drawable/blue_gradient.xml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,9 @@ | |||||||
|  | <?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> | ||||||
							
								
								
									
										9
									
								
								app/src/main/res/drawable/gradient_pink.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								app/src/main/res/drawable/gradient_pink.xml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,9 @@ | |||||||
|  | <?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> | ||||||
							
								
								
									
										9
									
								
								app/src/main/res/drawable/gradient_purpure.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								app/src/main/res/drawable/gradient_purpure.xml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,9 @@ | |||||||
|  | <?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> | ||||||
							
								
								
									
										9
									
								
								app/src/main/res/drawable/green_gradient.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								app/src/main/res/drawable/green_gradient.xml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,9 @@ | |||||||
|  | <?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> | ||||||
							
								
								
									
										14
									
								
								app/src/main/res/drawable/green_rectangle.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								app/src/main/res/drawable/green_rectangle.xml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,14 @@ | |||||||
|  | <?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> | ||||||
							
								
								
									
										10
									
								
								app/src/main/res/drawable/ic_add_24px.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								app/src/main/res/drawable/ic_add_24px.xml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,10 @@ | |||||||
|  | <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> | ||||||
							
								
								
									
										10
									
								
								app/src/main/res/drawable/ic_remove_24px.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								app/src/main/res/drawable/ic_remove_24px.xml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,10 @@ | |||||||
|  | <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> | ||||||
							
								
								
									
										10
									
								
								app/src/main/res/drawable/icon_pause.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								app/src/main/res/drawable/icon_pause.xml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,10 @@ | |||||||
|  | <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> | ||||||
							
								
								
									
										10
									
								
								app/src/main/res/drawable/icon_play.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								app/src/main/res/drawable/icon_play.xml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,10 @@ | |||||||
|  | <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> | ||||||
							
								
								
									
										10
									
								
								app/src/main/res/drawable/icon_stop.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								app/src/main/res/drawable/icon_stop.xml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,10 @@ | |||||||
|  | <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> | ||||||
							
								
								
									
										9
									
								
								app/src/main/res/drawable/pink_gradient.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								app/src/main/res/drawable/pink_gradient.xml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,9 @@ | |||||||
|  | <?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> | ||||||
							
								
								
									
										183
									
								
								app/src/main/res/layout/activity_creating_training.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										183
									
								
								app/src/main/res/layout/activity_creating_training.xml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,183 @@ | |||||||
|  | <?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="200dp" | ||||||
|  |         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_weight="1" | ||||||
|  |                 app:srcCompat="@drawable/ic_remove_24px" /> | ||||||
|  | 
 | ||||||
|  |             <TextView | ||||||
|  |                 android:id="@+id/numbers_of_sets" | ||||||
|  |                 android:layout_width="wrap_content" | ||||||
|  |                 android:layout_height="38dp" | ||||||
|  |                 android:layout_weight="1" | ||||||
|  |                 android:text="0" | ||||||
|  |                 android:textAlignment="center" | ||||||
|  |                 android:textSize="34sp" /> | ||||||
|  | 
 | ||||||
|  |             <ImageView | ||||||
|  |                 android:id="@+id/add_set" | ||||||
|  |                 android:layout_width="wrap_content" | ||||||
|  |                 android:layout_height="37dp" | ||||||
|  |                 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="50dp" | ||||||
|  |             android:orientation="horizontal"> | ||||||
|  | 
 | ||||||
|  |             <ImageView | ||||||
|  |                 android:id="@+id/del_res" | ||||||
|  |                 android:layout_width="wrap_content" | ||||||
|  |                 android:layout_height="37dp" | ||||||
|  |                 android:layout_weight="1" | ||||||
|  |                 app:srcCompat="@drawable/ic_remove_24px" /> | ||||||
|  | 
 | ||||||
|  |             <TextView | ||||||
|  |                 android:id="@+id/rest_sets" | ||||||
|  |                 android:layout_width="wrap_content" | ||||||
|  |                 android:layout_height="39dp" | ||||||
|  |                 android:layout_weight="1" | ||||||
|  |                 android:text="0" | ||||||
|  |                 android:textAlignment="center" | ||||||
|  |                 android:textSize="34sp" /> | ||||||
|  | 
 | ||||||
|  |             <ImageView | ||||||
|  |                 android:id="@+id/add_res" | ||||||
|  |                 android:layout_width="wrap_content" | ||||||
|  |                 android:layout_height="37dp" | ||||||
|  |                 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> | ||||||
| @ -7,13 +7,24 @@ | |||||||
|     android:layout_height="match_parent" |     android:layout_height="match_parent" | ||||||
|     tools:context=".MainActivity"> |     tools:context=".MainActivity"> | ||||||
| 
 | 
 | ||||||
|     <TextView |     <LinearLayout | ||||||
|  |         android:layout_width="match_parent" | ||||||
|  |         android:layout_height="match_parent" | ||||||
|  |         android:orientation="horizontal"> | ||||||
|  | 
 | ||||||
|  |         <Button | ||||||
|  |             android:id="@+id/button1" | ||||||
|  |             android:layout_width="171dp" | ||||||
|  |             android:layout_height="wrap_content" | ||||||
|  |             android:layout_weight="1" | ||||||
|  |             android:text="Button" /> | ||||||
|  | 
 | ||||||
|  |         <Button | ||||||
|  |             android:id="@+id/button2" | ||||||
|             android:layout_width="wrap_content" |             android:layout_width="wrap_content" | ||||||
|             android:layout_height="wrap_content" |             android:layout_height="wrap_content" | ||||||
|         android:text="Hello World!" |             android:layout_weight="1" | ||||||
|         app:layout_constraintBottom_toBottomOf="parent" |             android:text="Button2" /> | ||||||
|         app:layout_constraintEnd_toEndOf="parent" |     </LinearLayout> | ||||||
|         app:layout_constraintStart_toStartOf="parent" |  | ||||||
|         app:layout_constraintTop_toTopOf="parent" /> |  | ||||||
| 
 |  | ||||||
| </androidx.constraintlayout.widget.ConstraintLayout> | </androidx.constraintlayout.widget.ConstraintLayout> | ||||||
|  | 
 | ||||||
|  | |||||||
							
								
								
									
										137
									
								
								app/src/main/res/layout/activity_timer.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										137
									
								
								app/src/main/res/layout/activity_timer.xml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,137 @@ | |||||||
|  | <?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="#D0CBCB" | ||||||
|  |                 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="#D0CBCB" | ||||||
|  |                 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="#D0CBCB" | ||||||
|  |                 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="#D0CBCB" | ||||||
|  |                 android:textSize="34sp" /> | ||||||
|  |         </LinearLayout> | ||||||
|  | 
 | ||||||
|  |         <TextView | ||||||
|  |             android:id="@+id/time" | ||||||
|  |             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/work" | ||||||
|  |             android:layout_width="match_parent" | ||||||
|  |             android:layout_height="70dp" | ||||||
|  |             android:gravity="center" | ||||||
|  |             android:text="Работа" | ||||||
|  |             android:textAlignment="center" | ||||||
|  |             android:textColor="#D0CBCB" | ||||||
|  |             android:textSize="34sp" /> | ||||||
|  | 
 | ||||||
|  |     </LinearLayout> | ||||||
|  | 
 | ||||||
|  | </androidx.constraintlayout.widget.ConstraintLayout> | ||||||
| @ -2,4 +2,17 @@ | |||||||
| <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,3 +1,4 @@ | |||||||
| <resources> | <resources> | ||||||
|     <string name="app_name">TimerT</string> |     <string name="app_name">Timer</string> | ||||||
|  |     <string name="upper_start">START</string> | ||||||
| </resources> | </resources> | ||||||
| @ -5,5 +5,6 @@ | |||||||
|         <!-- <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> | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user