forked from stud179277/Timer
Итоговые формы
This commit is contained in:
parent
56d127fd3f
commit
7e82560aac
@ -12,6 +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" />
|
||||||
@ -23,10 +26,10 @@
|
|||||||
android:exported="false" />
|
android:exported="false" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".AllTraining"
|
android:name=".AllTraining"
|
||||||
android:exported="true"/>
|
android:exported="true" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".AddWorkout"
|
android:name=".AddWorkout"
|
||||||
android:exported="true"/>
|
android:exported="true" />
|
||||||
<activity
|
<activity
|
||||||
android:name=".MainActivity"
|
android:name=".MainActivity"
|
||||||
android:exported="true">
|
android:exported="true">
|
||||||
|
@ -4,6 +4,8 @@ import android.app.AlertDialog
|
|||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.widget.Button
|
import android.widget.Button
|
||||||
|
import android.widget.EditText
|
||||||
|
import android.widget.ImageView
|
||||||
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
|
||||||
@ -53,5 +55,46 @@ class AddWorkout : AppCompatActivity() {
|
|||||||
val intent = Intent(this, CreatingTraining::class.java)
|
val intent = Intent(this, CreatingTraining::class.java)
|
||||||
startActivity(intent)
|
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())
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -28,6 +28,7 @@ class AllTraining : AppCompatActivity() {
|
|||||||
isSave = true
|
isSave = true
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
val button_on_main_all: Button = findViewById(R.id.btn_on_main_all_vse)
|
val button_on_main_all: Button = findViewById(R.id.btn_on_main_all_vse)
|
||||||
button_on_main_all.setOnClickListener {
|
button_on_main_all.setOnClickListener {
|
||||||
if (isSave == false) {
|
if (isSave == false) {
|
||||||
|
@ -4,7 +4,9 @@ import android.app.AlertDialog
|
|||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.widget.Button
|
import android.widget.Button
|
||||||
|
import android.widget.EditText
|
||||||
import android.widget.ImageButton
|
import android.widget.ImageButton
|
||||||
|
import android.widget.ImageView
|
||||||
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
|
||||||
@ -29,6 +31,16 @@ class CreatingTraining : AppCompatActivity() {
|
|||||||
startActivity(intent)
|
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)
|
val button_on_main: Button = findViewById(R.id.btn_on_main)
|
||||||
button_on_main.setOnClickListener {
|
button_on_main.setOnClickListener {
|
||||||
if(isSave==false){
|
if(isSave==false){
|
||||||
@ -57,4 +69,23 @@ class CreatingTraining : AppCompatActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
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())
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
27
app/src/main/java/com/example/timert/History.kt
Normal file
27
app/src/main/java/com/example/timert/History.kt
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
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,6 +2,7 @@ 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
|
||||||
@ -46,9 +47,16 @@ class MainActivity : AppCompatActivity() {
|
|||||||
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 создания шаблона (форма 3)
|
//TODO: Intent для открытия Activity создания шаблона (форма 7)
|
||||||
|
val intent = Intent(this, History::class.java)
|
||||||
|
startActivity(intent)
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
val exits: Button = findViewById(R.id.btn_exit)
|
||||||
|
exits.setOnClickListener {
|
||||||
|
finish()
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -63,22 +63,27 @@
|
|||||||
android:id="@+id/del_set3"
|
android:id="@+id/del_set3"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="37dp"
|
android:layout_height="37dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
app:srcCompat="@drawable/ic_remove_24px" />
|
app:srcCompat="@drawable/ic_remove_24px" />
|
||||||
|
|
||||||
<TextView
|
<EditText
|
||||||
android:id="@+id/numbers_of_sets_all3"
|
android:id="@+id/numbers_of_sets_all"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="3dp"
|
||||||
android:layout_height="38dp"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:text="0"
|
android:ems="10"
|
||||||
android:textAlignment="center"
|
android:gravity="center"
|
||||||
android:textSize="34sp" />
|
android:inputType="number"
|
||||||
|
android:text="1"
|
||||||
|
android:textSize="26sp" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/add_set3"
|
android:id="@+id/add_set3"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="37dp"
|
android:layout_height="37dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
app:srcCompat="@drawable/ic_add_24px" />
|
app:srcCompat="@drawable/ic_add_24px" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
@ -97,25 +102,30 @@
|
|||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/del_set2"
|
android:id="@+id/del_res_set2"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="37dp"
|
android:layout_height="37dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
app:srcCompat="@drawable/ic_remove_24px" />
|
app:srcCompat="@drawable/ic_remove_24px" />
|
||||||
|
|
||||||
<TextView
|
<EditText
|
||||||
android:id="@+id/numbers_of_sets_all2"
|
android:id="@+id/rest_sets_all"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="3dp"
|
||||||
android:layout_height="38dp"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:text="0"
|
android:ems="10"
|
||||||
android:textAlignment="center"
|
android:gravity="center"
|
||||||
android:textSize="34sp" />
|
android:inputType="number"
|
||||||
|
android:text="5"
|
||||||
|
android:textSize="26sp" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/add_set2"
|
android:id="@+id/add_res_set2"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="37dp"
|
android:layout_height="37dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
app:srcCompat="@drawable/ic_add_24px" />
|
app:srcCompat="@drawable/ic_add_24px" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
@ -138,22 +148,27 @@
|
|||||||
android:id="@+id/del_set"
|
android:id="@+id/del_set"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="37dp"
|
android:layout_height="37dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
app:srcCompat="@drawable/ic_remove_24px" />
|
app:srcCompat="@drawable/ic_remove_24px" />
|
||||||
|
|
||||||
<TextView
|
<EditText
|
||||||
android:id="@+id/numbers_of_sets_allall"
|
android:id="@+id/time_work_all"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="3dp"
|
||||||
android:layout_height="38dp"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:text="0"
|
android:ems="10"
|
||||||
android:textAlignment="center"
|
android:gravity="center"
|
||||||
android:textSize="34sp" />
|
android:inputType="number"
|
||||||
|
android:text="5"
|
||||||
|
android:textSize="26sp" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/add_set"
|
android:id="@+id/add_set"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="37dp"
|
android:layout_height="37dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
app:srcCompat="@drawable/ic_add_24px" />
|
app:srcCompat="@drawable/ic_add_24px" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
@ -175,22 +190,27 @@
|
|||||||
android:id="@+id/del_res"
|
android:id="@+id/del_res"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="37dp"
|
android:layout_height="37dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
app:srcCompat="@drawable/ic_remove_24px" />
|
app:srcCompat="@drawable/ic_remove_24px" />
|
||||||
|
|
||||||
<TextView
|
<EditText
|
||||||
android:id="@+id/rest_sets_allall"
|
android:id="@+id/rest_workout_all"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="3dp"
|
||||||
android:layout_height="39dp"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:text="0"
|
android:ems="10"
|
||||||
android:textAlignment="center"
|
android:gravity="center"
|
||||||
android:textSize="34sp" />
|
android:inputType="number"
|
||||||
|
android:text="5"
|
||||||
|
android:textSize="26sp" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/add_res"
|
android:id="@+id/add_res"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="37dp"
|
android:layout_height="37dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
app:srcCompat="@drawable/ic_add_24px" />
|
app:srcCompat="@drawable/ic_add_24px" />
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/setting_training"
|
android:id="@+id/setting_training"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="200dp"
|
android:layout_height="250dp"
|
||||||
android:layout_marginTop="37dp"
|
android:layout_marginTop="37dp"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/linearLayout"
|
app:layout_constraintTop_toBottomOf="@+id/linearLayout"
|
||||||
@ -64,22 +64,27 @@
|
|||||||
android:id="@+id/del_set"
|
android:id="@+id/del_set"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="37dp"
|
android:layout_height="37dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
app:srcCompat="@drawable/ic_remove_24px" />
|
app:srcCompat="@drawable/ic_remove_24px" />
|
||||||
|
|
||||||
<TextView
|
<EditText
|
||||||
android:id="@+id/numbers_of_sets_allall"
|
android:id="@+id/time_work"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="3dp"
|
||||||
android:layout_height="38dp"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:text="0"
|
android:ems="10"
|
||||||
android:textAlignment="center"
|
android:gravity="center"
|
||||||
android:textSize="34sp" />
|
android:inputType="number"
|
||||||
|
android:text="5"
|
||||||
|
android:textSize="26sp" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/add_set"
|
android:id="@+id/add_set"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="37dp"
|
android:layout_height="37dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
app:srcCompat="@drawable/ic_add_24px" />
|
app:srcCompat="@drawable/ic_add_24px" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
@ -94,29 +99,34 @@
|
|||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="50dp"
|
android:layout_height="95dp"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/del_res"
|
android:id="@+id/del_res"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="37dp"
|
android:layout_height="37dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
app:srcCompat="@drawable/ic_remove_24px" />
|
app:srcCompat="@drawable/ic_remove_24px" />
|
||||||
|
|
||||||
<TextView
|
<EditText
|
||||||
android:id="@+id/rest_sets_allall"
|
android:id="@+id/rest_workout"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="3dp"
|
||||||
android:layout_height="39dp"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:text="0"
|
android:ems="10"
|
||||||
android:textAlignment="center"
|
android:gravity="center"
|
||||||
android:textSize="34sp" />
|
android:inputType="number"
|
||||||
|
android:text="5"
|
||||||
|
android:textSize="26sp" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/add_res"
|
android:id="@+id/add_res"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="37dp"
|
android:layout_height="37dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
app:srcCompat="@drawable/ic_add_24px" />
|
app:srcCompat="@drawable/ic_add_24px" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:id="@+id/setting_training"
|
android:id="@+id/setting_training"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="200dp"
|
android:layout_height="220dp"
|
||||||
android:layout_marginTop="37dp"
|
android:layout_marginTop="37dp"
|
||||||
android:orientation="vertical"
|
android:orientation="vertical"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/linearLayout"
|
app:layout_constraintTop_toBottomOf="@+id/linearLayout"
|
||||||
@ -64,22 +64,27 @@
|
|||||||
android:id="@+id/del_set"
|
android:id="@+id/del_set"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="37dp"
|
android:layout_height="37dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
app:srcCompat="@drawable/ic_remove_24px" />
|
app:srcCompat="@drawable/ic_remove_24px" />
|
||||||
|
|
||||||
<TextView
|
<EditText
|
||||||
android:id="@+id/numbers_of_sets"
|
android:id="@+id/numbers_of_sets"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="3dp"
|
||||||
android:layout_height="38dp"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:text="0"
|
android:ems="10"
|
||||||
android:textAlignment="center"
|
android:gravity="center"
|
||||||
android:textSize="34sp" />
|
android:inputType="number"
|
||||||
|
android:text="1"
|
||||||
|
android:textSize="26sp" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/add_set"
|
android:id="@+id/add_set"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="37dp"
|
android:layout_height="37dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
app:srcCompat="@drawable/ic_add_24px" />
|
app:srcCompat="@drawable/ic_add_24px" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
@ -94,29 +99,34 @@
|
|||||||
|
|
||||||
<LinearLayout
|
<LinearLayout
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="50dp"
|
android:layout_height="wrap_content"
|
||||||
android:orientation="horizontal">
|
android:orientation="horizontal">
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/del_res"
|
android:id="@+id/del_res"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="37dp"
|
android:layout_height="37dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
app:srcCompat="@drawable/ic_remove_24px" />
|
app:srcCompat="@drawable/ic_remove_24px" />
|
||||||
|
|
||||||
<TextView
|
<EditText
|
||||||
android:id="@+id/rest_sets"
|
android:id="@+id/rest_sets"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="3dp"
|
||||||
android:layout_height="39dp"
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_gravity="center"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
android:text="0"
|
android:ems="10"
|
||||||
android:textAlignment="center"
|
android:gravity="center"
|
||||||
android:textSize="34sp" />
|
android:inputType="number"
|
||||||
|
android:text="5"
|
||||||
|
android:textSize="26sp" />
|
||||||
|
|
||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/add_res"
|
android:id="@+id/add_res"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="37dp"
|
android:layout_height="37dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
android:layout_weight="1"
|
android:layout_weight="1"
|
||||||
app:srcCompat="@drawable/ic_add_24px" />
|
app:srcCompat="@drawable/ic_add_24px" />
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
57
app/src/main/res/layout/activity_history.xml
Normal file
57
app/src/main/res/layout/activity_history.xml
Normal file
@ -0,0 +1,57 @@
|
|||||||
|
<?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,14 +8,17 @@
|
|||||||
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_imagemain"
|
||||||
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"
|
||||||
@ -93,6 +96,29 @@
|
|||||||
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
|
||||||
|
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" />
|
||||||
</androidx.cardview.widget.CardView>
|
</androidx.cardview.widget.CardView>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
Loading…
Reference in New Issue
Block a user