first commit
15
.gitignore
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
*.iml
|
||||
.gradle
|
||||
/local.properties
|
||||
/.idea/caches
|
||||
/.idea/libraries
|
||||
/.idea/modules.xml
|
||||
/.idea/workspace.xml
|
||||
/.idea/navEditor.xml
|
||||
/.idea/assetWizardSettings.xml
|
||||
.DS_Store
|
||||
/build
|
||||
/captures
|
||||
.externalNativeBuild
|
||||
.cxx
|
||||
local.properties
|
3
.idea/.gitignore
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
1
.idea/.name
generated
Normal file
@ -0,0 +1 @@
|
||||
Your IMC
|
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
@ -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
@ -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
@ -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
@ -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
@ -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>
|
9
.idea/misc.xml
generated
Normal file
@ -0,0 +1,9 @@
|
||||
<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
@ -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
@ -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
@ -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>
|
1
app/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/build
|
46
app/build.gradle.kts
Normal file
@ -0,0 +1,46 @@
|
||||
plugins {
|
||||
alias(libs.plugins.android.application)
|
||||
alias(libs.plugins.kotlin.android)
|
||||
}
|
||||
|
||||
android {
|
||||
namespace = "com.mrdiro.yourimc"
|
||||
compileSdk = 35
|
||||
|
||||
defaultConfig {
|
||||
applicationId = "com.mrdiro.yourimc"
|
||||
minSdk = 24
|
||||
targetSdk = 35
|
||||
versionCode = 1
|
||||
versionName = "1.0"
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
isMinifyEnabled = false
|
||||
proguardFiles(
|
||||
getDefaultProguardFile("proguard-android-optimize.txt"),
|
||||
"proguard-rules.pro"
|
||||
)
|
||||
}
|
||||
}
|
||||
compileOptions {
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
}
|
||||
kotlinOptions {
|
||||
jvmTarget = "11"
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
implementation(libs.androidx.core.ktx)
|
||||
implementation(libs.androidx.appcompat)
|
||||
implementation(libs.material)
|
||||
testImplementation(libs.junit)
|
||||
androidTestImplementation(libs.androidx.junit)
|
||||
androidTestImplementation(libs.androidx.espresso.core)
|
||||
}
|
21
app/proguard-rules.pro
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
# Add project specific ProGuard rules here.
|
||||
# You can control the set of applied configuration files using the
|
||||
# proguardFiles setting in build.gradle.
|
||||
#
|
||||
# For more details, see
|
||||
# http://developer.android.com/guide/developing/tools/proguard.html
|
||||
|
||||
# If your project uses WebView with JS, uncomment the following
|
||||
# and specify the fully qualified class name to the JavaScript interface
|
||||
# class:
|
||||
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
|
||||
# public *;
|
||||
#}
|
||||
|
||||
# Uncomment this to preserve the line number information for
|
||||
# debugging stack traces.
|
||||
#-keepattributes SourceFile,LineNumberTable
|
||||
|
||||
# If you keep the line number information, uncomment this to
|
||||
# hide the original source file name.
|
||||
#-renamesourcefileattribute SourceFile
|
@ -0,0 +1,24 @@
|
||||
package com.mrdiro.yourimc
|
||||
|
||||
import androidx.test.platform.app.InstrumentationRegistry
|
||||
import androidx.test.ext.junit.runners.AndroidJUnit4
|
||||
|
||||
import org.junit.Test
|
||||
import org.junit.runner.RunWith
|
||||
|
||||
import org.junit.Assert.*
|
||||
|
||||
/**
|
||||
* Instrumented test, which will execute on an Android device.
|
||||
*
|
||||
* See [testing documentation](http://d.android.com/tools/testing).
|
||||
*/
|
||||
@RunWith(AndroidJUnit4::class)
|
||||
class ExampleInstrumentedTest {
|
||||
@Test
|
||||
fun useAppContext() {
|
||||
// Context of the app under test.
|
||||
val appContext = InstrumentationRegistry.getInstrumentation().targetContext
|
||||
assertEquals("com.mrdiro.yourimc", appContext.packageName)
|
||||
}
|
||||
}
|
25
app/src/main/AndroidManifest.xml
Normal file
@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools">
|
||||
|
||||
<application
|
||||
android:allowBackup="true"
|
||||
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||
android:fullBackupContent="@xml/backup_rules"
|
||||
android:icon="@mipmap/ic_launcher"
|
||||
android:label="@string/app_name"
|
||||
android:roundIcon="@mipmap/ic_launcher_round"
|
||||
android:supportsRtl="true"
|
||||
android:theme="@style/Theme.YourIMC"
|
||||
tools:targetApi="31">
|
||||
|
||||
<activity android:name=".MainActivity" android:exported="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<activity android:name=".screen.ResultScreen" />
|
||||
</application>
|
||||
|
||||
</manifest>
|
167
app/src/main/java/com/mrdiro/yourimc/main_activity.kt
Normal file
@ -0,0 +1,167 @@
|
||||
package com.mrdiro.yourimc
|
||||
|
||||
import android.content.Intent
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
import android.widget.Button
|
||||
import android.widget.TextView
|
||||
import androidx.activity.enableEdgeToEdge
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
import androidx.appcompat.app.AppCompatDelegate
|
||||
import androidx.cardview.widget.CardView
|
||||
import androidx.core.content.ContextCompat
|
||||
import com.google.android.material.slider.Slider
|
||||
import com.mrdiro.yourimc.screen.ResultScreen
|
||||
|
||||
class MainActivity: AppCompatActivity() {
|
||||
private lateinit var cardViewMale: CardView
|
||||
private lateinit var cardViewFemale: CardView
|
||||
|
||||
private lateinit var imgMaleText: TextView
|
||||
private lateinit var imgFemaleText: TextView
|
||||
|
||||
private lateinit var color: Map<String , Int>
|
||||
private lateinit var sliderHeight: Slider
|
||||
|
||||
private lateinit var textViewSizeHeight: TextView
|
||||
private lateinit var textViewNumberAge: TextView
|
||||
private lateinit var textViewNumberWeight: TextView
|
||||
|
||||
private lateinit var buttonAddAge: Button
|
||||
private lateinit var buttonSubtractAge: Button
|
||||
private lateinit var buttonAddWeight: Button
|
||||
private lateinit var buttonSubtractWeight: Button
|
||||
private lateinit var buttonCalc: Button
|
||||
|
||||
private var currentAge = 18
|
||||
private var currentWeight = 45
|
||||
private var currentHeight = 120
|
||||
private var genderSelected = ""
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
setContentView(R.layout.activity_main)
|
||||
enableEdgeToEdge()
|
||||
|
||||
AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES)
|
||||
|
||||
initComponent()
|
||||
initListener()
|
||||
}
|
||||
|
||||
private fun initComponent() {
|
||||
cardViewMale = findViewById(R.id.cardViewMale)
|
||||
cardViewFemale = findViewById(R.id.cardViewFemale)
|
||||
|
||||
imgMaleText = findViewById(R.id.imgMaleText)
|
||||
imgFemaleText = findViewById(R.id.imgFemaleText)
|
||||
|
||||
sliderHeight = findViewById(R.id.sliderHeight)
|
||||
|
||||
textViewSizeHeight = findViewById(R.id.textViewSizeHeight)
|
||||
textViewNumberAge = findViewById(R.id.textViewNumberAge)
|
||||
textViewNumberWeight = findViewById(R.id.textViewNumberWeight)
|
||||
|
||||
buttonAddAge = findViewById(R.id.buttonAddAge)
|
||||
buttonSubtractAge = findViewById(R.id.buttonSubtractAge)
|
||||
buttonAddWeight = findViewById(R.id.buttonAddWeight)
|
||||
buttonSubtractWeight = findViewById(R.id.buttonSubtractWeight)
|
||||
buttonCalc = findViewById(R.id.buttonCalc)
|
||||
|
||||
color = mapOf(
|
||||
"onPrimaryContainer" to ContextCompat.getColor(this, R.color.md_theme_onPrimaryContainer),
|
||||
"primaryContainer" to ContextCompat.getColor(this, R.color.md_theme_primaryContainer),
|
||||
"surfContainer" to ContextCompat.getColor(this, R.color.md_theme_surfaceContainer),
|
||||
"onSurface" to ContextCompat.getColor(this, R.color.md_theme_onSurface)
|
||||
)
|
||||
|
||||
textViewNumberAge.text = currentAge.toString()
|
||||
|
||||
val weight = getString(R.string.main_textView_weightKl, currentWeight)
|
||||
textViewNumberWeight.text = weight
|
||||
|
||||
val height = getString(R.string.main_textView_hight, currentHeight)
|
||||
textViewSizeHeight.text = height
|
||||
}
|
||||
|
||||
private fun initListener() {
|
||||
cardViewMale.setOnClickListener { maleSelected() }
|
||||
cardViewFemale.setOnClickListener { femaleSelected() }
|
||||
sliderHeight.addOnChangeListener { _, value, _ -> setHeight(value) }
|
||||
buttonAddAge.setOnClickListener { plusAge() }
|
||||
buttonSubtractAge.setOnClickListener { subtractAge() }
|
||||
buttonAddWeight.setOnClickListener { plusWeight() }
|
||||
buttonSubtractWeight.setOnClickListener { subtractWeight() }
|
||||
buttonCalc.setOnClickListener { calc() }
|
||||
}
|
||||
|
||||
private fun maleSelected() {
|
||||
cardViewMale.setCardBackgroundColor(color["onPrimaryContainer"]!!)
|
||||
imgMaleText.setTextColor(color["primaryContainer"]!!)
|
||||
|
||||
cardViewFemale.setCardBackgroundColor(color["surfContainer"]!!)
|
||||
imgFemaleText.setTextColor(color["onSurface"]!!)
|
||||
|
||||
genderSelected = "male"
|
||||
}
|
||||
|
||||
private fun femaleSelected() {
|
||||
cardViewFemale.setCardBackgroundColor(color["onPrimaryContainer"]!!)
|
||||
imgFemaleText.setTextColor(color["primaryContainer"]!!)
|
||||
|
||||
cardViewMale.setCardBackgroundColor(color["surfContainer"]!!)
|
||||
imgMaleText.setTextColor(color["onSurface"]!!)
|
||||
|
||||
genderSelected = "female"
|
||||
}
|
||||
|
||||
private fun setHeight(value: Float) {
|
||||
val height = getString(R.string.main_textView_hight, value.toInt())
|
||||
currentHeight = value.toInt()
|
||||
textViewSizeHeight.text = height
|
||||
}
|
||||
|
||||
private fun plusAge() {
|
||||
if (currentAge < 110) {
|
||||
currentAge++
|
||||
|
||||
textViewNumberAge.text = currentAge.toString()
|
||||
}
|
||||
}
|
||||
|
||||
private fun subtractAge(){
|
||||
if (currentAge > 0) {
|
||||
currentAge--
|
||||
|
||||
textViewNumberAge.text = currentAge.toString()
|
||||
}
|
||||
}
|
||||
|
||||
private fun plusWeight() {
|
||||
if (currentWeight < 300) {
|
||||
currentWeight++
|
||||
|
||||
val weight = getString(R.string.main_textView_weightKl, currentWeight)
|
||||
textViewNumberWeight.text = weight
|
||||
}
|
||||
}
|
||||
|
||||
private fun subtractWeight() {
|
||||
if (currentWeight > 2) {
|
||||
currentWeight--
|
||||
|
||||
val weight = getString(R.string.main_textView_weightKl, currentWeight)
|
||||
textViewNumberWeight.text = weight
|
||||
}
|
||||
}
|
||||
|
||||
private fun calc() {
|
||||
val heightInMeter = currentHeight.toDouble() / 100
|
||||
val imc = currentWeight.toDouble() / (heightInMeter * heightInMeter)
|
||||
val intentResultScreen = Intent(this, ResultScreen::class.java)
|
||||
|
||||
intentResultScreen.putExtra("IMC", imc)
|
||||
startActivity(intentResultScreen)
|
||||
}
|
||||
}
|
23
app/src/main/java/com/mrdiro/yourimc/screen/result_screen.kt
Normal file
@ -0,0 +1,23 @@
|
||||
package com.mrdiro.yourimc.screen
|
||||
|
||||
import com.mrdiro.yourimc.R
|
||||
|
||||
import android.os.Bundle
|
||||
import android.util.Log
|
||||
import androidx.activity.enableEdgeToEdge
|
||||
import androidx.appcompat.app.AppCompatActivity
|
||||
|
||||
class ResultScreen: AppCompatActivity() {
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
|
||||
setContentView(R.layout.activity_result)
|
||||
enableEdgeToEdge()
|
||||
|
||||
val result = intent.extras?.getDouble("IMC")
|
||||
|
||||
if (result != null) {
|
||||
Log.d("IMC", result.toString())
|
||||
}
|
||||
}
|
||||
}
|
22
app/src/main/res/drawable/card_custom_style.xml
Normal file
@ -0,0 +1,22 @@
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:state_pressed="true">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/md_theme_surfaceContainer"/>
|
||||
<corners android:radius="16dp"/>
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
<item android:state_focused="true">
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/md_theme_surfaceContainerHighest"/>
|
||||
<corners android:radius="16dp" />
|
||||
</shape>
|
||||
</item>
|
||||
|
||||
<item>
|
||||
<shape android:shape="rectangle">
|
||||
<solid android:color="@color/md_theme_surfaceContainerHigh" />
|
||||
<corners android:radius="16dp"/>
|
||||
</shape>
|
||||
</item>
|
||||
</selector>
|
11
app/src/main/res/drawable/ic_add.xml
Normal file
@ -0,0 +1,11 @@
|
||||
<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,13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"/>
|
||||
|
||||
</vector>
|
24
app/src/main/res/drawable/ic_female.xml
Normal file
@ -0,0 +1,24 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="362.12dp"
|
||||
android:height="401.01dp"
|
||||
android:viewportWidth="362.12"
|
||||
android:viewportHeight="401.01">
|
||||
<path
|
||||
android:pathData="M284.27,248.06l-133,0l0,-180l115,63z"
|
||||
android:fillColor="#2f2e41"/>
|
||||
<path
|
||||
android:pathData="M175.84,129.94m-86.35,0a86.35,86.35 0,1 1,172.7 0a86.35,86.35 0,1 1,-172.7 0"
|
||||
android:fillColor="#ffb6b6"/>
|
||||
<path
|
||||
android:pathData="M166.27,379.06l-57,-112l17,-38l-3.9,-39.43l77.9,-14.57l46,112z"
|
||||
android:fillColor="#ffb6b6"/>
|
||||
<path
|
||||
android:pathData="m362.12,320.1c-0.97,1.01 -1.96,2.01 -2.95,3 -3.14,3.14 -6.34,6.19 -9.61,9.15 -49,44.44 -111.87,68.76 -178.48,68.76 -61.41,0 -119.64,-20.67 -166.75,-58.72 -0.03,-0.02 -0.05,-0.04 -0.08,-0.07 -1.43,-1.15 -2.84,-2.32 -4.25,-3.51C0.25,337.99 0.52,337.28 0.79,336.58 15.94,297.11 45.86,277.8 64.02,269.35c9,-4.19 15.11,-5.72 15.11,-5.72l21.32,-38.4 15.01,28 11.06,20.64 45.38,84.67 39.15,-97.48 12.13,-30.22 3.11,-7.74 14.79,11.51 14,10.89 28.19,6.22 22.87,5.05 31.06,6.86c12.56,10.23 20.2,29.69 24.47,53.87 0.16,0.86 0.31,1.73 0.45,2.6z"
|
||||
android:fillColor="@color/md_theme_tertiary"/>
|
||||
<path
|
||||
android:pathData="m130.42,31.81c10.52,-17.67 29.84,-29.79 50.32,-31.58 20.48,-1.79 41.61,6.81 55.03,22.39 8,9.28 13.24,20.65 21.03,30.11 16.77,20.35 45.37,32.24 52.7,57.57 3.2,11.05 1.6,22.85 -0.01,34.25 -1.39,9.76 -2.77,19.53 -4.16,29.29 -1.08,7.6 -2.11,15.61 0.74,22.74 3.34,8.36 11.34,13.84 16.51,21.21 8.8,12.54 8.16,30.9 -1.5,42.8 -4.19,5.16 -9.74,9.05 -14.13,14.04 -4.39,4.99 -7.65,11.81 -5.81,18.19 3.52,12.23 22.7,15.16 24.81,27.72 1.08,6.42 -3.36,12.83 -9.17,15.76 -5.81,2.93 -12.65,3.02 -19.11,2.23 -24.55,-2.98 -47.29,-18.33 -59.24,-39.98 -11.95,-21.65 -12.83,-49.07 -2.27,-71.43 8.67,-18.37 24.79,-34.61 24.61,-54.92 -0.1,-11.07 -5.17,-21.4 -10.14,-31.29 -10.16,-20.25 -20.32,-40.49 -30.48,-60.74 -5.44,-10.84 -11.76,-22.53 -22.96,-27.19 -8.66,-3.6 -18.48,-2.2 -27.74,-0.73 -9.26,1.47 -19.07,2.91 -27.76,-0.63 -8.68,-3.54 -15.25,-14.05 -11.11,-22.47"
|
||||
android:fillColor="#2f2e41"/>
|
||||
<path
|
||||
android:pathData="m145.55,32.73c-16.68,-5.49 -35.4,3.32 -46.69,16.77 -11.29,13.45 -16.77,30.71 -21.99,47.48 -2.99,9.61 -5.98,19.21 -8.97,28.82 -2.81,9.04 -5.62,18.07 -8.44,27.11 -3.31,10.63 -6.64,21.92 -3.93,32.72 1.96,7.8 7.01,14.89 7.12,22.94 0.11,8.41 -5.15,15.79 -9.76,22.81 -4.61,7.03 -8.94,15.38 -6.75,23.49 3.34,12.34 20.5,19.13 19.56,31.88 -0.31,4.26 -2.77,8.19 -2.73,12.46 0.06,5.43 4.31,10.12 9.29,12.28 4.98,2.16 10.58,2.28 16.01,2.19 16.65,-0.29 33.27,-2.27 49.53,-5.89 6.25,-1.39 12.61,-3.1 17.82,-6.84 5.21,-3.74 9.09,-9.92 8.41,-16.3 -1.06,-9.93 -11.73,-15.56 -17.12,-23.97 -5.29,-8.26 -5.17,-18.72 -7.45,-28.26C136.33,219.31 128.59,207.87 122.77,195.71 100.92,149.99 108.57,91.72 141.49,53.2c2.91,-3.41 6.09,-6.83 7.3,-11.15 1.21,-4.31 -0.35,-9.81 -4.57,-11.32"
|
||||
android:fillColor="#2f2e41"/>
|
||||
</vector>
|
170
app/src/main/res/drawable/ic_launcher_background.xml
Normal file
@ -0,0 +1,170 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path
|
||||
android:fillColor="#3DDC84"
|
||||
android:pathData="M0,0h108v108h-108z" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M9,0L9,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,0L19,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,0L29,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,0L39,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,0L49,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,0L59,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,0L69,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,0L79,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M89,0L89,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M99,0L99,108"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,9L108,9"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,19L108,19"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,29L108,29"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,39L108,39"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,49L108,49"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,59L108,59"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,69L108,69"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,79L108,79"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,89L108,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M0,99L108,99"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,29L89,29"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,39L89,39"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,49L89,49"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,59L89,59"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,69L89,69"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M19,79L89,79"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M29,19L29,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M39,19L39,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M49,19L49,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M59,19L59,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M69,19L69,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
<path
|
||||
android:fillColor="#00000000"
|
||||
android:pathData="M79,19L79,89"
|
||||
android:strokeWidth="0.8"
|
||||
android:strokeColor="#33FFFFFF" />
|
||||
</vector>
|
30
app/src/main/res/drawable/ic_launcher_foreground.xml
Normal file
@ -0,0 +1,30 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:aapt="http://schemas.android.com/aapt"
|
||||
android:width="108dp"
|
||||
android:height="108dp"
|
||||
android:viewportWidth="108"
|
||||
android:viewportHeight="108">
|
||||
<path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
|
||||
<aapt:attr name="android:fillColor">
|
||||
<gradient
|
||||
android:endX="85.84757"
|
||||
android:endY="92.4963"
|
||||
android:startX="42.9492"
|
||||
android:startY="49.59793"
|
||||
android:type="linear">
|
||||
<item
|
||||
android:color="#44000000"
|
||||
android:offset="0.0" />
|
||||
<item
|
||||
android:color="#00000000"
|
||||
android:offset="1.0" />
|
||||
</gradient>
|
||||
</aapt:attr>
|
||||
</path>
|
||||
<path
|
||||
android:fillColor="#FFFFFF"
|
||||
android:fillType="nonZero"
|
||||
android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
|
||||
android:strokeWidth="1"
|
||||
android:strokeColor="#00000000" />
|
||||
</vector>
|
18
app/src/main/res/drawable/ic_male.xml
Normal file
@ -0,0 +1,18 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="321.78dp"
|
||||
android:height="382.81dp"
|
||||
android:viewportWidth="321.78"
|
||||
android:viewportHeight="382.81">
|
||||
<path
|
||||
android:pathData="M159.38,111.74m-86.35,0a86.35,86.35 0,1 1,172.7 0a86.35,86.35 0,1 1,-172.7 0"
|
||||
android:fillColor="#ffb6b6"/>
|
||||
<path
|
||||
android:pathData="M149.81,360.86l-57,-112l17,-38l-3.9,-39.43l77.9,-14.57l46,112z"
|
||||
android:fillColor="#ffb6b6"/>
|
||||
<path
|
||||
android:pathData="m104.66,191.16 l17.03,3.85c0,0 -13.39,-42.45 -8.84,-46.51 4.54,-4.05 15.68,2.33 15.68,2.33l11.7,13.12 14.25,-14.51c0,0 15.47,-19.24 21.53,-24.65 6.06,-5.4 -3.67,-25.46 -3.67,-25.46 0,0 89.89,-24.24 56.44,-67.84 0,0 -19.61,-34.18 -26,-23.05 -6.39,11.14 -14,-6.55 -14,-6.55l-23.25,4.42c0,0 -45.89,-27.06 -89.45,30.83 -43.56,57.89 28.58,154.02 28.58,154.02h-0z"
|
||||
android:fillColor="#2f2e41"/>
|
||||
<path
|
||||
android:pathData="M321.78,323.76C274.59,362.02 216.21,382.81 154.62,382.81 98.38,382.81 44.81,365.47 0,333.33 0.08,332.49 0.16,331.66 0.23,330.83c1.19,-13 2.25,-25.64 2.95,-36.12 2.71,-40.69 97.64,-67.81 97.64,-67.81 0,0 0.43,0.43 1.29,1.18 5.24,4.6 26.51,21.28 63.81,25.94 33.26,4.16 44.21,-15.57 47.52,-25.02 1,-2.88 1.3,-4.81 1.3,-4.81L312.38,270.3c6.37,9.1 8.86,28.7 9.35,50.73 0.02,0.91 0.04,1.81 0.05,2.73z"
|
||||
android:fillColor="@color/md_theme_tertiary"/>
|
||||
</vector>
|
5
app/src/main/res/drawable/ic_subtract.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<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:fillType="evenOdd" android:pathData="M4,11h16v2h-16z"/>
|
||||
|
||||
</vector>
|
9
app/src/main/res/drawable/img_wave.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="200dp"
|
||||
android:height="200dp"
|
||||
android:viewportWidth="1440"
|
||||
android:viewportHeight="320">
|
||||
<path
|
||||
android:pathData="M0,96L60,117.3C120,139 240,181 360,170.7C480,160 600,96 720,58.7C840,21 960,11 1080,16C1200,21 1320,43 1380,53.3L1440,64L1440,320L1380,320C1320,320 1200,320 1080,320C960,320 840,320 720,320C600,320 480,320 360,320C240,320 120,320 60,320L0,320Z"
|
||||
android:fillColor="@color/md_theme_surfaceContainerLow"/>
|
||||
</vector>
|
BIN
app/src/main/res/font/montserrat_regular.ttf
Normal file
408
app/src/main/res/layout/activity_main.xml
Normal file
@ -0,0 +1,408 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="@color/md_theme_tertiaryContainer">
|
||||
|
||||
<!-- lineTop -->
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/lineTop"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.06"/>
|
||||
|
||||
<!-- fondo blanco -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:elevation="1dp"
|
||||
app:cardBackgroundColor="@color/md_theme_surfaceContainerLowest"
|
||||
app:cardCornerRadius="25dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@id/lineTop">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="20dp">
|
||||
|
||||
<!-- line1 -->
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/line1"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.23"/>
|
||||
|
||||
<!-- line2 -->
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/line2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.46"/>
|
||||
|
||||
<!-- line3 -->
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/line3"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.7"/>
|
||||
|
||||
<!-- line4 -->
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/line4"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="horizontal"
|
||||
app:layout_constraintGuide_percent="0.9"/>
|
||||
|
||||
<!-- boton - hombre -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/cardViewMale"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="160dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardBackgroundColor="@color/md_theme_surfaceContainer"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/cardViewFemale">
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="20dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imgMale"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_margin="5dp"
|
||||
android:src="@drawable/ic_male"
|
||||
android:contentDescription="@string/main_male_image_description"
|
||||
app:layout_constraintBottom_toTopOf="@id/imgMaleText"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintVertical_chainStyle="spread"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/imgMaleText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/main_male_text"
|
||||
android:textColor="@color/md_theme_onSurface"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintTop_toBottomOf="@id/imgMale"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"/>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- boton - mujer -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/cardViewFemale"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="160dp"
|
||||
android:layout_marginStart="8dp"
|
||||
app:cardCornerRadius="16dp"
|
||||
app:cardBackgroundColor="@color/md_theme_surfaceContainerLow"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/cardViewMale">
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="20dp">
|
||||
|
||||
<ImageView
|
||||
android:id="@+id/imgFemale"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_margin="5dp"
|
||||
android:src="@drawable/ic_female"
|
||||
android:contentDescription="@string/main_female_image_description"
|
||||
app:layout_constraintBottom_toTopOf="@id/imgFemaleText"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintVertical_chainStyle="spread"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/imgFemaleText"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/main_female_text"
|
||||
android:textColor="@color/md_theme_onSurface"
|
||||
android:textSize="18sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintTop_toBottomOf="@id/imgFemale"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"/>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- slider - altura -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="160dp"
|
||||
app:cardCornerRadius="25dp"
|
||||
app:cardBackgroundColor="@color/md_theme_surfaceContainerLow"
|
||||
app:layout_constraintTop_toBottomOf="@id/line1"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="20dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textViewHeight"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/main_altura_text"
|
||||
android:textColor="@color/md_theme_onSurfaceVariant"
|
||||
android:textSize="16sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintBottom_toTopOf="@id/textViewSizeHeight"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintVertical_chainStyle="packed"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textViewSizeHeight"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/main_textView_hight"
|
||||
android:textColor="@color/md_theme_onSurface"
|
||||
android:textSize="22sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="120 cm"
|
||||
app:layout_constraintTop_toBottomOf="@id/textViewHeight"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/sliderHeight"/>
|
||||
|
||||
<com.google.android.material.slider.Slider
|
||||
android:id="@+id/sliderHeight"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="48dp"
|
||||
android:value="120.0"
|
||||
android:valueFrom="105.0"
|
||||
android:valueTo="210.0"
|
||||
android:stepSize="1.0"
|
||||
android:layout_marginTop="10dp"
|
||||
android:contentDescription="@string/main_altura_slider"
|
||||
app:layout_constraintTop_toBottomOf="@id/textViewSizeHeight"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- boton - edad -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/cardViewAge"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="160dp"
|
||||
android:layout_marginEnd="8dp"
|
||||
app:cardCornerRadius="25dp"
|
||||
app:cardBackgroundColor="@color/md_theme_surfaceContainerLow"
|
||||
app:layout_constraintTop_toBottomOf="@id/line2"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/cardViewWeight">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="5dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textViewTextAge"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/main_textAge_textView"
|
||||
android:textColor="@color/md_theme_onSurface"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/textViewNumberAge"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textViewNumberAge"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/md_theme_onSurface"
|
||||
android:textSize="25sp"
|
||||
android:textStyle="bold"
|
||||
tools:text="18"
|
||||
app:layout_constraintTop_toBottomOf="@id/textViewTextAge"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/constraintButtonAge"/>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/constraintButtonAge"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/textViewNumberAge"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent">
|
||||
|
||||
<Button
|
||||
android:id="@+id/buttonAddAge"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:contentDescription="@string/main_button_addAge"
|
||||
android:padding="20dp"
|
||||
android:layout_marginEnd="5dp"
|
||||
app:icon="@drawable/ic_add"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/buttonSubtractAge"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/buttonSubtractAge"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:contentDescription="@string/main_button_subtracAge"
|
||||
android:padding="20dp"
|
||||
android:layout_marginStart="5dp"
|
||||
app:icon="@drawable/ic_subtract"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/buttonAddAge"
|
||||
app:layout_constraintEnd_toEndOf="parent"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- botón - peso -->
|
||||
<androidx.cardview.widget.CardView
|
||||
android:id="@+id/cardViewWeight"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="160dp"
|
||||
android:layout_marginStart="8dp"
|
||||
app:cardCornerRadius="25dp"
|
||||
app:cardBackgroundColor="@color/md_theme_surfaceContainerLow"
|
||||
app:layout_constraintTop_toBottomOf="@id/line2"
|
||||
app:layout_constraintStart_toEndOf="@id/cardViewAge"
|
||||
app:layout_constraintEnd_toEndOf="parent">
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:padding="5dp">
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textViewTextWeight"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/main_textWeight_textView"
|
||||
android:textColor="@color/md_theme_onSurface"
|
||||
android:textSize="18sp"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/textViewNumberWeight"/>
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textViewNumberWeight"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:textColor="@color/md_theme_onSurface"
|
||||
android:textSize="25sp"
|
||||
android:textStyle="bold"
|
||||
android:text="@string/main_textView_weightKl"
|
||||
tools:text="60 kl"
|
||||
app:layout_constraintTop_toBottomOf="@id/textViewTextWeight"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/constraintButtonWeight"/>
|
||||
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/constraintButtonWeight"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintTop_toBottomOf="@id/textViewNumberWeight"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent">
|
||||
|
||||
<Button
|
||||
android:id="@+id/buttonAddWeight"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:padding="20dp"
|
||||
android:contentDescription="@string/main_button_addWeight"
|
||||
android:layout_marginEnd="5dp"
|
||||
app:icon="@drawable/ic_add"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/buttonSubtractWeight"/>
|
||||
|
||||
<Button
|
||||
android:id="@+id/buttonSubtractWeight"
|
||||
android:layout_width="60dp"
|
||||
android:layout_height="60dp"
|
||||
android:padding="20dp"
|
||||
android:contentDescription="@string/main_button_subtractWeight"
|
||||
android:layout_marginStart="5dp"
|
||||
app:icon="@drawable/ic_subtract"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/buttonAddWeight"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- boton calcualar -->
|
||||
<Button
|
||||
android:id="@+id/buttonCalc"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="68dp"
|
||||
android:text="@string/main_calc_button_description"
|
||||
android:textSize="25sp"
|
||||
android:textStyle="bold"
|
||||
app:layout_constraintTop_toBottomOf="@id/line3"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintBottom_toTopOf="@id/line4"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</androidx.cardview.widget.CardView>
|
||||
|
||||
<!-- base de la vista - wave -->
|
||||
<View
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="100dp"
|
||||
android:background="@drawable/img_wave"
|
||||
android:elevation="2dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"/>
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
9
app/src/main/res/layout/activity_result.xml
Normal file
@ -0,0 +1,9 @@
|
||||
<?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:layout_width="match_parent"
|
||||
android:layout_height="match_parent">
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
6
app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
6
app/src/main/res/mipmap-anydpi-v26/ic_launcher_round.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<background android:drawable="@drawable/ic_launcher_background" />
|
||||
<foreground android:drawable="@drawable/ic_launcher_foreground" />
|
||||
<monochrome android:drawable="@drawable/ic_launcher_foreground" />
|
||||
</adaptive-icon>
|
BIN
app/src/main/res/mipmap-hdpi/ic_launcher.webp
Normal file
After Width: | Height: | Size: 1.4 KiB |
BIN
app/src/main/res/mipmap-hdpi/ic_launcher_round.webp
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
app/src/main/res/mipmap-mdpi/ic_launcher.webp
Normal file
After Width: | Height: | Size: 982 B |
BIN
app/src/main/res/mipmap-mdpi/ic_launcher_round.webp
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_launcher.webp
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
app/src/main/res/mipmap-xhdpi/ic_launcher_round.webp
Normal file
After Width: | Height: | Size: 3.8 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher.webp
Normal file
After Width: | Height: | Size: 2.8 KiB |
BIN
app/src/main/res/mipmap-xxhdpi/ic_launcher_round.webp
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher.webp
Normal file
After Width: | Height: | Size: 3.8 KiB |
BIN
app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.webp
Normal file
After Width: | Height: | Size: 7.6 KiB |
143
app/src/main/res/values/colors.xml
Normal file
@ -0,0 +1,143 @@
|
||||
<resources>
|
||||
<color name="md_theme_primary">#002FC8</color>
|
||||
<color name="md_theme_onPrimary">#FFFFFF</color>
|
||||
<color name="md_theme_primaryContainer">#1945F7</color>
|
||||
<color name="md_theme_onPrimaryContainer">#D1D6FF</color>
|
||||
<color name="md_theme_secondary">#4A58A8</color>
|
||||
<color name="md_theme_onSecondary">#FFFFFF</color>
|
||||
<color name="md_theme_secondaryContainer">#9AA8FF</color>
|
||||
<color name="md_theme_onSecondaryContainer">#2B3A89</color>
|
||||
<color name="md_theme_tertiary">#780095</color>
|
||||
<color name="md_theme_onTertiary">#FFFFFF</color>
|
||||
<color name="md_theme_tertiaryContainer">#9A19BB</color>
|
||||
<color name="md_theme_onTertiaryContainer">#F9C7FF</color>
|
||||
<color name="md_theme_error">#BA1A1A</color>
|
||||
<color name="md_theme_onError">#FFFFFF</color>
|
||||
<color name="md_theme_errorContainer">#FFDAD6</color>
|
||||
<color name="md_theme_onErrorContainer">#93000A</color>
|
||||
<color name="md_theme_background">#FBF8FF</color>
|
||||
<color name="md_theme_onBackground">#1A1B25</color>
|
||||
<color name="md_theme_surface">#FBF8FF</color>
|
||||
<color name="md_theme_onSurface">#1A1B25</color>
|
||||
<color name="md_theme_surfaceVariant">#E0E1F6</color>
|
||||
<color name="md_theme_onSurfaceVariant">#444656</color>
|
||||
<color name="md_theme_outline">#747688</color>
|
||||
<color name="md_theme_outlineVariant">#C4C5D9</color>
|
||||
<color name="md_theme_scrim">#000000</color>
|
||||
<color name="md_theme_inverseSurface">#2F303A</color>
|
||||
<color name="md_theme_inverseOnSurface">#F0EFFE</color>
|
||||
<color name="md_theme_inversePrimary">#BAC3FF</color>
|
||||
<color name="md_theme_primaryFixed">#DEE0FF</color>
|
||||
<color name="md_theme_onPrimaryFixed">#00105B</color>
|
||||
<color name="md_theme_primaryFixedDim">#BAC3FF</color>
|
||||
<color name="md_theme_onPrimaryFixedVariant">#002FC8</color>
|
||||
<color name="md_theme_secondaryFixed">#DEE0FF</color>
|
||||
<color name="md_theme_onSecondaryFixed">#00105B</color>
|
||||
<color name="md_theme_secondaryFixedDim">#BAC3FF</color>
|
||||
<color name="md_theme_onSecondaryFixedVariant">#31408F</color>
|
||||
<color name="md_theme_tertiaryFixed">#FDD6FF</color>
|
||||
<color name="md_theme_onTertiaryFixed">#340042</color>
|
||||
<color name="md_theme_tertiaryFixedDim">#F3AEFF</color>
|
||||
<color name="md_theme_onTertiaryFixedVariant">#790095</color>
|
||||
<color name="md_theme_surfaceDim">#D9D9E7</color>
|
||||
<color name="md_theme_surfaceBright">#FBF8FF</color>
|
||||
<color name="md_theme_surfaceContainerLowest">#FFFFFF</color>
|
||||
<color name="md_theme_surfaceContainerLow">#F4F2FF</color>
|
||||
<color name="md_theme_surfaceContainer">#EDECFB</color>
|
||||
<color name="md_theme_surfaceContainerHigh">#E8E7F5</color>
|
||||
<color name="md_theme_surfaceContainerHighest">#E2E1EF</color>
|
||||
<color name="md_theme_primary_mediumContrast">#00239E</color>
|
||||
<color name="md_theme_onPrimary_mediumContrast">#FFFFFF</color>
|
||||
<color name="md_theme_primaryContainer_mediumContrast">#1945F7</color>
|
||||
<color name="md_theme_onPrimaryContainer_mediumContrast">#FFFFFF</color>
|
||||
<color name="md_theme_secondary_mediumContrast">#1E2E7D</color>
|
||||
<color name="md_theme_onSecondary_mediumContrast">#FFFFFF</color>
|
||||
<color name="md_theme_secondaryContainer_mediumContrast">#5967B8</color>
|
||||
<color name="md_theme_onSecondaryContainer_mediumContrast">#FFFFFF</color>
|
||||
<color name="md_theme_tertiary_mediumContrast">#5E0075</color>
|
||||
<color name="md_theme_onTertiary_mediumContrast">#FFFFFF</color>
|
||||
<color name="md_theme_tertiaryContainer_mediumContrast">#9A19BB</color>
|
||||
<color name="md_theme_onTertiaryContainer_mediumContrast">#FFFFFF</color>
|
||||
<color name="md_theme_error_mediumContrast">#740006</color>
|
||||
<color name="md_theme_onError_mediumContrast">#FFFFFF</color>
|
||||
<color name="md_theme_errorContainer_mediumContrast">#CF2C27</color>
|
||||
<color name="md_theme_onErrorContainer_mediumContrast">#FFFFFF</color>
|
||||
<color name="md_theme_background_mediumContrast">#FBF8FF</color>
|
||||
<color name="md_theme_onBackground_mediumContrast">#1A1B25</color>
|
||||
<color name="md_theme_surface_mediumContrast">#FBF8FF</color>
|
||||
<color name="md_theme_onSurface_mediumContrast">#0F111A</color>
|
||||
<color name="md_theme_surfaceVariant_mediumContrast">#E0E1F6</color>
|
||||
<color name="md_theme_onSurfaceVariant_mediumContrast">#333545</color>
|
||||
<color name="md_theme_outline_mediumContrast">#4F5162</color>
|
||||
<color name="md_theme_outlineVariant_mediumContrast">#6A6C7E</color>
|
||||
<color name="md_theme_scrim_mediumContrast">#000000</color>
|
||||
<color name="md_theme_inverseSurface_mediumContrast">#2F303A</color>
|
||||
<color name="md_theme_inverseOnSurface_mediumContrast">#F0EFFE</color>
|
||||
<color name="md_theme_inversePrimary_mediumContrast">#BAC3FF</color>
|
||||
<color name="md_theme_primaryFixed_mediumContrast">#3759FF</color>
|
||||
<color name="md_theme_onPrimaryFixed_mediumContrast">#FFFFFF</color>
|
||||
<color name="md_theme_primaryFixedDim_mediumContrast">#0039EC</color>
|
||||
<color name="md_theme_onPrimaryFixedVariant_mediumContrast">#FFFFFF</color>
|
||||
<color name="md_theme_secondaryFixed_mediumContrast">#5967B8</color>
|
||||
<color name="md_theme_onSecondaryFixed_mediumContrast">#FFFFFF</color>
|
||||
<color name="md_theme_secondaryFixedDim_mediumContrast">#404E9E</color>
|
||||
<color name="md_theme_onSecondaryFixedVariant_mediumContrast">#FFFFFF</color>
|
||||
<color name="md_theme_tertiaryFixed_mediumContrast">#AC31CC</color>
|
||||
<color name="md_theme_onTertiaryFixed_mediumContrast">#FFFFFF</color>
|
||||
<color name="md_theme_tertiaryFixedDim_mediumContrast">#8F00B1</color>
|
||||
<color name="md_theme_onTertiaryFixedVariant_mediumContrast">#FFFFFF</color>
|
||||
<color name="md_theme_surfaceDim_mediumContrast">#C6C5D3</color>
|
||||
<color name="md_theme_surfaceBright_mediumContrast">#FBF8FF</color>
|
||||
<color name="md_theme_surfaceContainerLowest_mediumContrast">#FFFFFF</color>
|
||||
<color name="md_theme_surfaceContainerLow_mediumContrast">#F4F2FF</color>
|
||||
<color name="md_theme_surfaceContainer_mediumContrast">#E8E7F5</color>
|
||||
<color name="md_theme_surfaceContainerHigh_mediumContrast">#DCDBE9</color>
|
||||
<color name="md_theme_surfaceContainerHighest_mediumContrast">#D1D0DE</color>
|
||||
<color name="md_theme_primary_highContrast">#001C85</color>
|
||||
<color name="md_theme_onPrimary_highContrast">#FFFFFF</color>
|
||||
<color name="md_theme_primaryContainer_highContrast">#0031CE</color>
|
||||
<color name="md_theme_onPrimaryContainer_highContrast">#FFFFFF</color>
|
||||
<color name="md_theme_secondary_highContrast">#112273</color>
|
||||
<color name="md_theme_onSecondary_highContrast">#FFFFFF</color>
|
||||
<color name="md_theme_secondaryContainer_highContrast">#334291</color>
|
||||
<color name="md_theme_onSecondaryContainer_highContrast">#FFFFFF</color>
|
||||
<color name="md_theme_tertiary_highContrast">#4E0062</color>
|
||||
<color name="md_theme_onTertiary_highContrast">#FFFFFF</color>
|
||||
<color name="md_theme_tertiaryContainer_highContrast">#7D009A</color>
|
||||
<color name="md_theme_onTertiaryContainer_highContrast">#FFFFFF</color>
|
||||
<color name="md_theme_error_highContrast">#600004</color>
|
||||
<color name="md_theme_onError_highContrast">#FFFFFF</color>
|
||||
<color name="md_theme_errorContainer_highContrast">#98000A</color>
|
||||
<color name="md_theme_onErrorContainer_highContrast">#FFFFFF</color>
|
||||
<color name="md_theme_background_highContrast">#FBF8FF</color>
|
||||
<color name="md_theme_onBackground_highContrast">#1A1B25</color>
|
||||
<color name="md_theme_surface_highContrast">#FBF8FF</color>
|
||||
<color name="md_theme_onSurface_highContrast">#000000</color>
|
||||
<color name="md_theme_surfaceVariant_highContrast">#E0E1F6</color>
|
||||
<color name="md_theme_onSurfaceVariant_highContrast">#000000</color>
|
||||
<color name="md_theme_outline_highContrast">#292B3B</color>
|
||||
<color name="md_theme_outlineVariant_highContrast">#464859</color>
|
||||
<color name="md_theme_scrim_highContrast">#000000</color>
|
||||
<color name="md_theme_inverseSurface_highContrast">#2F303A</color>
|
||||
<color name="md_theme_inverseOnSurface_highContrast">#FFFFFF</color>
|
||||
<color name="md_theme_inversePrimary_highContrast">#BAC3FF</color>
|
||||
<color name="md_theme_primaryFixed_highContrast">#0031CE</color>
|
||||
<color name="md_theme_onPrimaryFixed_highContrast">#FFFFFF</color>
|
||||
<color name="md_theme_primaryFixedDim_highContrast">#002195</color>
|
||||
<color name="md_theme_onPrimaryFixedVariant_highContrast">#FFFFFF</color>
|
||||
<color name="md_theme_secondaryFixed_highContrast">#334291</color>
|
||||
<color name="md_theme_onSecondaryFixed_highContrast">#FFFFFF</color>
|
||||
<color name="md_theme_secondaryFixedDim_highContrast">#1A2A79</color>
|
||||
<color name="md_theme_onSecondaryFixedVariant_highContrast">#FFFFFF</color>
|
||||
<color name="md_theme_tertiaryFixed_highContrast">#7D009A</color>
|
||||
<color name="md_theme_onTertiaryFixed_highContrast">#FFFFFF</color>
|
||||
<color name="md_theme_tertiaryFixedDim_highContrast">#59006F</color>
|
||||
<color name="md_theme_onTertiaryFixedVariant_highContrast">#FFFFFF</color>
|
||||
<color name="md_theme_surfaceDim_highContrast">#B8B8C5</color>
|
||||
<color name="md_theme_surfaceBright_highContrast">#FBF8FF</color>
|
||||
<color name="md_theme_surfaceContainerLowest_highContrast">#FFFFFF</color>
|
||||
<color name="md_theme_surfaceContainerLow_highContrast">#F0EFFE</color>
|
||||
<color name="md_theme_surfaceContainer_highContrast">#E2E1EF</color>
|
||||
<color name="md_theme_surfaceContainerHigh_highContrast">#D4D3E1</color>
|
||||
<color name="md_theme_surfaceContainerHighest_highContrast">#C6C5D3</color>
|
||||
</resources>
|
25
app/src/main/res/values/strings.xml
Normal file
@ -0,0 +1,25 @@
|
||||
<resources>
|
||||
<string name="app_name">Your IMC</string>
|
||||
|
||||
<!-- string para la vista principal -->
|
||||
<string name="main_imgView1_description">Imagen base de la pantalla</string>
|
||||
<string name="main_male_image_description">Imagen hombre</string>
|
||||
<string name="main_female_image_description">Imagen mujer</string>
|
||||
<string name="main_male_text">Soy hombre</string>
|
||||
<string name="main_female_text">Soy mujer</string>
|
||||
|
||||
<string name="main_altura_text">Mi altura</string>
|
||||
<string name="main_altura_slider">Seleccionar altura desaeada</string>
|
||||
<string name="main_textView_hight">%1$d cm</string>
|
||||
|
||||
<string name="main_textAge_textView">Edad</string>
|
||||
<string name="main_button_addAge">Aumenta la edad</string>
|
||||
<string name="main_button_subtracAge">Disminuye la edad</string>
|
||||
|
||||
<string name="main_textWeight_textView">Peso</string>
|
||||
<string name="main_button_addWeight">Aumenta el peso</string>
|
||||
<string name="main_textView_weightKl">%1$d kl</string>
|
||||
<string name="main_button_subtractWeight">Disminuye el peso</string>
|
||||
|
||||
<string name="main_calc_button_description">Calcular</string>
|
||||
</resources>
|
52
app/src/main/res/values/themes.xml
Normal file
@ -0,0 +1,52 @@
|
||||
<resources>
|
||||
<!-- Base application theme. -->
|
||||
<style name="Theme.YourIMC" parent="Theme.Material3.Dark.NoActionBar">
|
||||
<item name="colorPrimary">@color/md_theme_primary</item>
|
||||
<item name="colorOnPrimary">@color/md_theme_onPrimary</item>
|
||||
<item name="colorPrimaryContainer">@color/md_theme_primaryContainer</item>
|
||||
<item name="colorOnPrimaryContainer">@color/md_theme_onPrimaryContainer</item>
|
||||
<item name="colorSecondary">@color/md_theme_secondary</item>
|
||||
<item name="colorOnSecondary">@color/md_theme_onSecondary</item>
|
||||
<item name="colorSecondaryContainer">@color/md_theme_secondaryContainer</item>
|
||||
<item name="colorOnSecondaryContainer">@color/md_theme_onSecondaryContainer</item>
|
||||
<item name="colorTertiary">@color/md_theme_tertiary</item>
|
||||
<item name="colorOnTertiary">@color/md_theme_onTertiary</item>
|
||||
<item name="colorTertiaryContainer">@color/md_theme_tertiaryContainer</item>
|
||||
<item name="colorOnTertiaryContainer">@color/md_theme_onTertiaryContainer</item>
|
||||
<item name="colorError">@color/md_theme_error</item>
|
||||
<item name="colorOnError">@color/md_theme_onError</item>
|
||||
<item name="colorErrorContainer">@color/md_theme_errorContainer</item>
|
||||
<item name="colorOnErrorContainer">@color/md_theme_onErrorContainer</item>
|
||||
<item name="android:colorBackground">@color/md_theme_background</item>
|
||||
<item name="colorOnBackground">@color/md_theme_onBackground</item>
|
||||
<item name="colorSurface">@color/md_theme_surface</item>
|
||||
<item name="colorOnSurface">@color/md_theme_onSurface</item>
|
||||
<item name="colorSurfaceVariant">@color/md_theme_surfaceVariant</item>
|
||||
<item name="colorOnSurfaceVariant">@color/md_theme_onSurfaceVariant</item>
|
||||
<item name="colorOutline">@color/md_theme_outline</item>
|
||||
<item name="colorOutlineVariant">@color/md_theme_outlineVariant</item>
|
||||
<item name="colorSurfaceInverse">@color/md_theme_inverseSurface</item>
|
||||
<item name="colorOnSurfaceInverse">@color/md_theme_inverseOnSurface</item>
|
||||
<item name="colorPrimaryInverse">@color/md_theme_inversePrimary</item>
|
||||
<item name="colorPrimaryFixed">@color/md_theme_primaryFixed</item>
|
||||
<item name="colorOnPrimaryFixed">@color/md_theme_onPrimaryFixed</item>
|
||||
<item name="colorPrimaryFixedDim">@color/md_theme_primaryFixedDim</item>
|
||||
<item name="colorOnPrimaryFixedVariant">@color/md_theme_onPrimaryFixedVariant</item>
|
||||
<item name="colorSecondaryFixed">@color/md_theme_secondaryFixed</item>
|
||||
<item name="colorOnSecondaryFixed">@color/md_theme_onSecondaryFixed</item>
|
||||
<item name="colorSecondaryFixedDim">@color/md_theme_secondaryFixedDim</item>
|
||||
<item name="colorOnSecondaryFixedVariant">@color/md_theme_onSecondaryFixedVariant</item>
|
||||
<item name="colorTertiaryFixed">@color/md_theme_tertiaryFixed</item>
|
||||
<item name="colorOnTertiaryFixed">@color/md_theme_onTertiaryFixed</item>
|
||||
<item name="colorTertiaryFixedDim">@color/md_theme_tertiaryFixedDim</item>
|
||||
<item name="colorOnTertiaryFixedVariant">@color/md_theme_onTertiaryFixedVariant</item>
|
||||
<item name="colorSurfaceDim">@color/md_theme_surfaceDim</item>
|
||||
<item name="colorSurfaceBright">@color/md_theme_surfaceBright</item>
|
||||
<item name="colorSurfaceContainerLowest">@color/md_theme_surfaceContainerLowest</item>
|
||||
<item name="colorSurfaceContainerLow">@color/md_theme_surfaceContainerLow</item>
|
||||
<item name="colorSurfaceContainer">@color/md_theme_surfaceContainer</item>
|
||||
<item name="colorSurfaceContainerHigh">@color/md_theme_surfaceContainerHigh</item>
|
||||
<item name="colorSurfaceContainerHighest">@color/md_theme_surfaceContainerHighest</item>
|
||||
<item name="android:fontFamily">@font/montserrat_regular</item>
|
||||
</style>
|
||||
</resources>
|
13
app/src/main/res/xml/backup_rules.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
Sample backup rules file; uncomment and customize as necessary.
|
||||
See https://developer.android.com/guide/topics/data/autobackup
|
||||
for details.
|
||||
Note: This file is ignored for devices older than API 31
|
||||
See https://developer.android.com/about/versions/12/backup-restore
|
||||
-->
|
||||
<full-backup-content>
|
||||
<!--
|
||||
<include domain="sharedpref" path="."/>
|
||||
<exclude domain="sharedpref" path="device.xml"/>
|
||||
-->
|
||||
</full-backup-content>
|
19
app/src/main/res/xml/data_extraction_rules.xml
Normal file
@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?><!--
|
||||
Sample data extraction rules file; uncomment and customize as necessary.
|
||||
See https://developer.android.com/about/versions/12/backup-restore#xml-changes
|
||||
for details.
|
||||
-->
|
||||
<data-extraction-rules>
|
||||
<cloud-backup>
|
||||
<!-- TODO: Use <include> and <exclude> to control what is backed up.
|
||||
<include .../>
|
||||
<exclude .../>
|
||||
-->
|
||||
</cloud-backup>
|
||||
<!--
|
||||
<device-transfer>
|
||||
<include .../>
|
||||
<exclude .../>
|
||||
</device-transfer>
|
||||
-->
|
||||
</data-extraction-rules>
|
17
app/src/test/java/com/mrdiro/yourimc/ExampleUnitTest.kt
Normal file
@ -0,0 +1,17 @@
|
||||
package com.mrdiro.yourimc
|
||||
|
||||
import org.junit.Test
|
||||
|
||||
import org.junit.Assert.*
|
||||
|
||||
/**
|
||||
* Example local unit test, which will execute on the development machine (host).
|
||||
*
|
||||
* See [testing documentation](http://d.android.com/tools/testing).
|
||||
*/
|
||||
class ExampleUnitTest {
|
||||
@Test
|
||||
fun addition_isCorrect() {
|
||||
assertEquals(4, 2 + 2)
|
||||
}
|
||||
}
|
5
build.gradle.kts
Normal file
@ -0,0 +1,5 @@
|
||||
// Top-level build file where you can add configuration options common to all sub-projects/modules.
|
||||
plugins {
|
||||
alias(libs.plugins.android.application) apply false
|
||||
alias(libs.plugins.kotlin.android) apply false
|
||||
}
|
23
gradle.properties
Normal file
@ -0,0 +1,23 @@
|
||||
# Project-wide Gradle settings.
|
||||
# IDE (e.g. Android Studio) users:
|
||||
# Gradle settings configured through the IDE *will override*
|
||||
# any settings specified in this file.
|
||||
# For more details on how to configure your build environment visit
|
||||
# http://www.gradle.org/docs/current/userguide/build_environment.html
|
||||
# Specifies the JVM arguments used for the daemon process.
|
||||
# The setting is particularly useful for tweaking memory settings.
|
||||
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
|
||||
# When configured, Gradle will run in incubating parallel mode.
|
||||
# This option should only be used with decoupled projects. For more details, visit
|
||||
# https://developer.android.com/r/tools/gradle-multi-project-decoupled-projects
|
||||
# org.gradle.parallel=true
|
||||
# AndroidX package structure to make it clearer which packages are bundled with the
|
||||
# Android operating system, and which are packaged with your app's APK
|
||||
# https://developer.android.com/topic/libraries/support-library/androidx-rn
|
||||
android.useAndroidX=true
|
||||
# Kotlin code style for this project: "official" or "obsolete":
|
||||
kotlin.code.style=official
|
||||
# Enables namespacing of each library's R class so that its R class includes only the
|
||||
# resources declared in the library itself and none from the library's dependencies,
|
||||
# thereby reducing the size of the R class for that library
|
||||
android.nonTransitiveRClass=true
|
22
gradle/libs.versions.toml
Normal file
@ -0,0 +1,22 @@
|
||||
[versions]
|
||||
agp = "8.9.2"
|
||||
kotlin = "2.0.21"
|
||||
coreKtx = "1.16.0"
|
||||
junit = "4.13.2"
|
||||
junitVersion = "1.2.1"
|
||||
espressoCore = "3.6.1"
|
||||
appcompat = "1.7.0"
|
||||
material = "1.12.0"
|
||||
|
||||
[libraries]
|
||||
androidx-core-ktx = { group = "androidx.core", name = "core-ktx", version.ref = "coreKtx" }
|
||||
junit = { group = "junit", name = "junit", version.ref = "junit" }
|
||||
androidx-junit = { group = "androidx.test.ext", name = "junit", version.ref = "junitVersion" }
|
||||
androidx-espresso-core = { group = "androidx.test.espresso", name = "espresso-core", version.ref = "espressoCore" }
|
||||
androidx-appcompat = { group = "androidx.appcompat", name = "appcompat", version.ref = "appcompat" }
|
||||
material = { group = "com.google.android.material", name = "material", version.ref = "material" }
|
||||
|
||||
[plugins]
|
||||
android-application = { id = "com.android.application", version.ref = "agp" }
|
||||
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
|
||||
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Normal file
6
gradle/wrapper/gradle-wrapper.properties
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
#Thu Apr 24 12:41:08 COT 2025
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
185
gradlew
vendored
Normal file
@ -0,0 +1,185 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
#
|
||||
# Copyright 2015 the original author or authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
##
|
||||
## Gradle start up script for UN*X
|
||||
##
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
# Resolve links: $0 may be a link
|
||||
PRG="$0"
|
||||
# Need this for relative symlinks.
|
||||
while [ -h "$PRG" ] ; do
|
||||
ls=`ls -ld "$PRG"`
|
||||
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||
if expr "$link" : '/.*' > /dev/null; then
|
||||
PRG="$link"
|
||||
else
|
||||
PRG=`dirname "$PRG"`"/$link"
|
||||
fi
|
||||
done
|
||||
SAVED="`pwd`"
|
||||
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||
APP_HOME="`pwd -P`"
|
||||
cd "$SAVED" >/dev/null
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=`basename "$0"`
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD="maximum"
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
}
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
}
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "`uname`" in
|
||||
CYGWIN* )
|
||||
cygwin=true
|
||||
;;
|
||||
Darwin* )
|
||||
darwin=true
|
||||
;;
|
||||
MINGW* )
|
||||
msys=true
|
||||
;;
|
||||
NONSTOP* )
|
||||
nonstop=true
|
||||
;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||
else
|
||||
JAVACMD="$JAVA_HOME/bin/java"
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD="java"
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||
MAX_FD_LIMIT=`ulimit -H -n`
|
||||
if [ $? -eq 0 ] ; then
|
||||
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||
MAX_FD="$MAX_FD_LIMIT"
|
||||
fi
|
||||
ulimit -n $MAX_FD
|
||||
if [ $? -ne 0 ] ; then
|
||||
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||
fi
|
||||
else
|
||||
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||
fi
|
||||
fi
|
||||
|
||||
# For Darwin, add options to specify how the application appears in the dock
|
||||
if $darwin; then
|
||||
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||
fi
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||
|
||||
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||
|
||||
# We build the pattern for arguments to be converted via cygpath
|
||||
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||
SEP=""
|
||||
for dir in $ROOTDIRSRAW ; do
|
||||
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||
SEP="|"
|
||||
done
|
||||
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||
# Add a user-defined pattern to the cygpath arguments
|
||||
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||
fi
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
i=0
|
||||
for arg in "$@" ; do
|
||||
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||
|
||||
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||
else
|
||||
eval `echo args$i`="\"$arg\""
|
||||
fi
|
||||
i=`expr $i + 1`
|
||||
done
|
||||
case $i in
|
||||
0) set -- ;;
|
||||
1) set -- "$args0" ;;
|
||||
2) set -- "$args0" "$args1" ;;
|
||||
3) set -- "$args0" "$args1" "$args2" ;;
|
||||
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
# Escape application args
|
||||
save () {
|
||||
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||
echo " "
|
||||
}
|
||||
APP_ARGS=`save "$@"`
|
||||
|
||||
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||
|
||||
exec "$JAVACMD" "$@"
|
89
gradlew.bat
vendored
Normal file
@ -0,0 +1,89 @@
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
23
settings.gradle.kts
Normal file
@ -0,0 +1,23 @@
|
||||
pluginManagement {
|
||||
repositories {
|
||||
google {
|
||||
content {
|
||||
includeGroupByRegex("com\\.android.*")
|
||||
includeGroupByRegex("com\\.google.*")
|
||||
includeGroupByRegex("androidx.*")
|
||||
}
|
||||
}
|
||||
mavenCentral()
|
||||
gradlePluginPortal()
|
||||
}
|
||||
}
|
||||
dependencyResolutionManagement {
|
||||
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.name = "Your IMC"
|
||||
include(":app")
|