-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3fe5718
commit ad92b30
Showing
12 changed files
with
433 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
app/src/main/java/com/example/nutrivida/SharedViewModel.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package com.example.nutrivida | ||
|
||
import androidx.lifecycle.LiveData | ||
import androidx.lifecycle.MutableLiveData | ||
import androidx.lifecycle.ViewModel | ||
|
||
class SharedViewModel : ViewModel() { | ||
private val _progress = MutableLiveData<Int>() | ||
val progress: LiveData<Int> get() = _progress | ||
|
||
fun setProgress(value: Int) { | ||
_progress.value = value | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:tint="#9DC70F" android:viewportHeight="24" android:viewportWidth="24" android:width="24dp"> | ||
|
||
<path android:fillColor="@android:color/white" android:pathData="M13,7h-2v4L7,11v2h4v4h2v-4h4v-2h-4L13,7zM12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM12,20c-4.41,0 -8,-3.59 -8,-8s3.59,-8 8,-8 8,3.59 8,8 -3.59,8 -8,8z"/> | ||
|
||
</vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item> | ||
<shape | ||
android:shape="ring" | ||
android:innerRadiusRatio="3" | ||
android:thicknessRatio="30.0" | ||
android:useLevel="true"> | ||
<gradient | ||
android:startColor="#3F51B5" | ||
android:centerColor="#03A9F4" | ||
android:endColor="#00BCD4"> | ||
|
||
</gradient> | ||
</shape> | ||
</item> | ||
</layer-list> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item> | ||
<shape | ||
android:shape="ring" | ||
android:innerRadiusRatio="3" | ||
android:thicknessRatio="30.0" | ||
android:useLevel="true"> | ||
<gradient | ||
android:startColor="#6C6103" | ||
android:centerColor="#A17C0F" | ||
android:endColor="#FFC107"> | ||
|
||
</gradient> | ||
</shape> | ||
</item> | ||
</layer-list> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item> | ||
<shape | ||
android:shape="ring" | ||
android:innerRadiusRatio="3" | ||
android:thicknessRatio="30.0" | ||
android:useLevel="false"> | ||
<solid | ||
android:color="@color/white"> | ||
</solid> | ||
</shape> | ||
</item> | ||
</layer-list> |
17 changes: 17 additions & 0 deletions
17
app/src/main/res/drawable/green_progressbar_background.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item> | ||
<shape | ||
android:shape="ring" | ||
android:innerRadiusRatio="3" | ||
android:thicknessRatio="30.0" | ||
android:useLevel="true"> | ||
<gradient | ||
android:startColor="#8BC34A" | ||
android:centerColor="#9DC56F" | ||
android:endColor="#ABC38F"> | ||
|
||
</gradient> | ||
</shape> | ||
</item> | ||
</layer-list> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
<?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"> | ||
|
||
<FrameLayout | ||
android:layout_width="388dp" | ||
android:layout_height="301dp" | ||
android:layout_gravity="center_vertical" | ||
app:layout_constraintBottom_toBottomOf="parent" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent"> | ||
|
||
<LinearLayout | ||
android:layout_width="391dp" | ||
android:layout_height="match_parent" | ||
android:background="@drawable/edittext_login" | ||
android:orientation="vertical"> | ||
|
||
<EditText | ||
android:id="@+id/txt_agua" | ||
android:layout_width="330dp" | ||
android:layout_height="50dp" | ||
android:layout_gravity="center_horizontal" | ||
android:layout_marginLeft="20dp" | ||
android:layout_marginTop="20dp" | ||
android:layout_marginRight="20dp" | ||
android:ems="10" | ||
android:hint="Cuantos vasos de agua bebiste hoy?" | ||
android:inputType="number" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintHorizontal_bias="0.493" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toTopOf="parent" /> | ||
|
||
<EditText | ||
android:id="@+id/txt_sueno" | ||
android:layout_width="330dp" | ||
android:layout_height="50dp" | ||
android:layout_gravity="center_horizontal" | ||
android:layout_marginLeft="20dp" | ||
android:layout_marginTop="20dp" | ||
android:layout_marginRight="20dp" | ||
android:ems="10" | ||
android:hint="Cantas horas dormiste hoy?" | ||
android:inputType="number" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@+id/txt_agua" /> | ||
|
||
<EditText | ||
android:id="@+id/txt_calorias" | ||
android:layout_width="330dp" | ||
android:layout_height="50dp" | ||
android:layout_gravity="center_horizontal" | ||
android:layout_marginLeft="20dp" | ||
android:layout_marginTop="20dp" | ||
android:layout_marginRight="20dp" | ||
android:ems="10" | ||
android:hint="Calorias ingeridas hoy" | ||
android:inputType="number" | ||
app:layout_constraintBottom_toTopOf="@+id/btn_reg" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintStart_toStartOf="parent" | ||
app:layout_constraintTop_toBottomOf="@+id/txt_sueno" /> | ||
|
||
<Button | ||
android:id="@+id/btn_reg" | ||
android:layout_width="330dp" | ||
android:layout_height="wrap_content" | ||
android:layout_gravity="center_horizontal" | ||
android:layout_marginLeft="20dp" | ||
android:layout_marginTop="20dp" | ||
android:layout_marginRight="20dp" | ||
android:layout_marginBottom="20dp" | ||
android:backgroundTint="@color/primary" | ||
android:text="Registrar" | ||
app:layout_constraintEnd_toEndOf="parent" | ||
app:layout_constraintHorizontal_bias="0.506" | ||
app:layout_constraintStart_toStartOf="parent" | ||
tools:layout_editor_absoluteY="275dp" /> | ||
</LinearLayout> | ||
|
||
</FrameLayout> | ||
|
||
</androidx.constraintlayout.widget.ConstraintLayout> |
Oops, something went wrong.