mirror of
https://github.com/dzeiocom/OpenHealth.git
synced 2025-04-22 19:02:16 +00:00
misc: some changes
This commit is contained in:
parent
cd6337a1b6
commit
3e5d10d817
@ -51,4 +51,4 @@ TL::DR
|
||||
|
||||
## License
|
||||
|
||||
This project is licensed under the IT License. A copy of the license is available at [LICENSE.md](https://github.com/dzeiocom/OpenHealth/blob/master/LICENSE.md)
|
||||
This project is licensed under the MIT License. A copy of the license is available at [LICENSE.md](https://github.com/dzeiocom/OpenHealth/blob/master/LICENSE.md)
|
||||
|
@ -28,12 +28,10 @@ android {
|
||||
keyAlias keystoreProperties["keyAlias"]
|
||||
storeFile file(keystoreProperties["storeFile"])
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
compileSdk 31
|
||||
compileSdk 33
|
||||
|
||||
defaultConfig {
|
||||
// App ID
|
||||
@ -43,12 +41,11 @@ android {
|
||||
minSdk 21
|
||||
|
||||
// Android 12
|
||||
targetSdk 31
|
||||
|
||||
versionCode 1
|
||||
targetSdk 33
|
||||
|
||||
// Semantic Versioning
|
||||
versionName "1.0.0"
|
||||
versionCode 1
|
||||
|
||||
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
|
||||
|
||||
@ -62,6 +59,7 @@ android {
|
||||
buildTypes {
|
||||
|
||||
release {
|
||||
// Slimmer version
|
||||
minifyEnabled true
|
||||
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
|
||||
signingConfig signingConfigs.release
|
||||
@ -79,9 +77,9 @@ android {
|
||||
// Optimization Level
|
||||
renderscriptOptimLevel 0
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Compile using JAVA 8
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
@ -91,31 +89,32 @@ android {
|
||||
jvmTarget = '1.8'
|
||||
}
|
||||
|
||||
// Enable View Binding and Data Binding
|
||||
buildFeatures {
|
||||
viewBinding true
|
||||
dataBinding true
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'androidx.core:core-ktx:1.7.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.4.0'
|
||||
// Core dependencies
|
||||
implementation 'androidx.core:core-ktx:1.8.0'
|
||||
implementation 'androidx.appcompat:appcompat:1.4.2'
|
||||
implementation 'javax.inject:javax.inject:1'
|
||||
implementation 'com.google.android.material:material:1.6.0-alpha01'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.2'
|
||||
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.4.0'
|
||||
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.4.0'
|
||||
implementation 'com.google.android.material:material:1.7.0-alpha02'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
|
||||
implementation 'androidx.lifecycle:lifecycle-livedata-ktx:2.5.0'
|
||||
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.0'
|
||||
|
||||
// Settings
|
||||
implementation "androidx.preference:preference-ktx:1.1.1"
|
||||
implementation "androidx.preference:preference-ktx:1.2.0"
|
||||
|
||||
// DataStore
|
||||
implementation "androidx.datastore:datastore:1.0.0"
|
||||
|
||||
// Navigation
|
||||
implementation 'androidx.navigation:navigation-fragment-ktx:2.3.5'
|
||||
implementation 'androidx.navigation:navigation-ui-ktx:2.3.5'
|
||||
implementation 'androidx.navigation:navigation-fragment-ktx:2.5.0'
|
||||
implementation 'androidx.navigation:navigation-ui-ktx:2.5.0'
|
||||
|
||||
// Services
|
||||
implementation 'androidx.work:work-runtime-ktx:2.7.1'
|
||||
@ -133,20 +132,16 @@ dependencies {
|
||||
kapt "com.google.dagger:hilt-compiler:2.40.5"
|
||||
|
||||
// Google Fit
|
||||
implementation "com.google.android.gms:play-services-fitness:21.0.0"
|
||||
implementation "com.google.android.gms:play-services-auth:20.0.0"
|
||||
implementation "com.google.android.gms:play-services-fitness:21.1.0"
|
||||
implementation "com.google.android.gms:play-services-auth:20.2.0"
|
||||
|
||||
// Samsung Health
|
||||
implementation files('libs/samsung-health-data-1.5.0.aar')
|
||||
implementation "com.google.code.gson:gson:2.8.9"
|
||||
|
||||
// ROOM
|
||||
def room_version = "2.4.0"
|
||||
|
||||
implementation "androidx.room:room-runtime:$room_version"
|
||||
kapt "androidx.room:room-compiler:$room_version"
|
||||
implementation "androidx.room:room-ktx:$room_version"
|
||||
testImplementation "androidx.room:room-testing:$room_version"
|
||||
|
||||
|
||||
implementation "androidx.room:room-runtime:2.4.2"
|
||||
kapt "androidx.room:room-compiler:2.4.2"
|
||||
implementation "androidx.room:room-ktx:2.4.2"
|
||||
testImplementation "androidx.room:room-testing:2.4.2"
|
||||
}
|
||||
|
@ -12,9 +12,7 @@ import android.view.Menu
|
||||
import android.view.MenuItem
|
||||
import androidx.navigation.NavController
|
||||
import androidx.navigation.fragment.NavHostFragment
|
||||
import androidx.navigation.ui.AppBarConfiguration
|
||||
import androidx.navigation.ui.navigateUp
|
||||
import androidx.navigation.ui.setupActionBarWithNavController
|
||||
import androidx.navigation.ui.*
|
||||
import androidx.work.WorkManager
|
||||
import com.dzeio.openhealth.core.BaseActivity
|
||||
import com.dzeio.openhealth.databinding.ActivityMainBinding
|
||||
@ -45,12 +43,17 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
|
||||
|
||||
appBarConfiguration = AppBarConfiguration(
|
||||
setOf(
|
||||
R.id.nav_home
|
||||
R.id.nav_home,
|
||||
R.id.nav_browse,
|
||||
R.id.nav_activity,
|
||||
R.id.nav_extensions
|
||||
)
|
||||
)
|
||||
|
||||
setupActionBarWithNavController(navController, appBarConfiguration)
|
||||
|
||||
binding.bottomNav.setupWithNavController(navController)
|
||||
|
||||
// binding.bottomNav.setOnItemSelectedListener {
|
||||
// val currentFragment = supportFragmentManager.fragments.last()
|
||||
// // currentFragment.javaClass.canonicalName
|
||||
@ -69,6 +72,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
|
||||
}
|
||||
|
||||
override fun onCreateOptionsMenu(menu: Menu): Boolean {
|
||||
super.onCreateOptionsMenu(menu)
|
||||
menuInflater.inflate(R.menu.main, menu)
|
||||
return true
|
||||
}
|
||||
@ -76,6 +80,9 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
|
||||
override fun onSupportNavigateUp(): Boolean =
|
||||
navController.navigateUp(appBarConfiguration) || super.onSupportNavigateUp()
|
||||
|
||||
override fun onOptionsItemSelected(item: MenuItem): Boolean =
|
||||
NavigationUI.onNavDestinationSelected(item, navController) || super.onOptionsItemSelected(item)
|
||||
|
||||
override fun onRequestPermissionsResult(
|
||||
requestCode: Int,
|
||||
permissions: Array<String>,
|
||||
@ -88,6 +95,7 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
|
||||
}
|
||||
}
|
||||
|
||||
@Deprecated("Deprecated in Java")
|
||||
override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
|
||||
super.onActivityResult(requestCode, resultCode, data)
|
||||
Log.d("MainActivity", "onActivityResult $requestCode $resultCode")
|
||||
@ -118,27 +126,4 @@ class MainActivity : BaseActivity<ActivityMainBinding>() {
|
||||
}
|
||||
}
|
||||
|
||||
override fun onOptionsItemSelected(item: MenuItem): Boolean {
|
||||
return when (item.itemId) {
|
||||
R.id.action_settings -> {
|
||||
navController.navigate(
|
||||
HomeFragmentDirections.actionNavHomeToNavSettings()
|
||||
)
|
||||
true
|
||||
}
|
||||
R.id.action_extensions -> {
|
||||
navController.navigate(
|
||||
HomeFragmentDirections.actionNavHomeToNavExtensions()
|
||||
)
|
||||
true
|
||||
}
|
||||
R.id.action_about -> {
|
||||
navController.navigate(
|
||||
HomeFragmentDirections.actionNavHomeToAboutFragment()
|
||||
)
|
||||
true
|
||||
}
|
||||
else -> super.onOptionsItemSelected(item)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -171,7 +171,7 @@ class GoogleFit() : Extension() {
|
||||
for (dataSet in response.dataSets) {
|
||||
Log.i(
|
||||
TAG,
|
||||
"Data returned for Data type: ${dataSet.dataType.name} ${dataSet.dataPoints.size} ${dataSet.dataSource.toDebugString()}"
|
||||
"Data returned for Data type: ${dataSet.dataType.name} ${dataSet.dataPoints.size} ${dataSet.dataSource}"
|
||||
)
|
||||
dataSet.dataPoints.forEach { dp ->
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
package com.dzeio.openhealth.services
|
||||
|
||||
import android.annotation.SuppressLint
|
||||
import android.app.job.JobParameters
|
||||
import android.app.job.JobService
|
||||
import android.content.Context
|
||||
@ -9,6 +10,7 @@ import android.hardware.SensorEventListener
|
||||
import android.hardware.SensorManager
|
||||
import android.util.Log
|
||||
|
||||
@SuppressLint("SpecifyJobSchedulerIdRange")
|
||||
class StepCountService : JobService(), SensorEventListener {
|
||||
override fun onStartJob(params: JobParameters?): Boolean {
|
||||
Log.d("StepCountService", "Service Started")
|
||||
|
@ -29,6 +29,7 @@ class ExtensionFragment :
|
||||
|
||||
val extension = ExtensionFactory.getExtension(args.extension)
|
||||
?: throw Exception("No Extension found!")
|
||||
requireActivity().actionBar?.title = extension.name
|
||||
|
||||
extension.init(requireActivity())
|
||||
|
||||
|
@ -26,6 +26,7 @@ import com.google.android.material.color.MaterialColors
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import kotlin.math.min
|
||||
import kotlinx.coroutines.flow.collectLatest
|
||||
import kotlin.math.max
|
||||
|
||||
@AndroidEntryPoint
|
||||
class HomeFragment : BaseFragment<HomeViewModel, FragmentHomeBinding>(HomeViewModel::class.java) {
|
||||
@ -126,19 +127,21 @@ class HomeFragment : BaseFragment<HomeViewModel, FragmentHomeBinding>(HomeViewMo
|
||||
viewModel.fetchWeights().collectLatest {
|
||||
updateGraph(it)
|
||||
}
|
||||
updateWater(0, 1)
|
||||
updateWater(0)
|
||||
}
|
||||
|
||||
viewModel.water.observe(viewLifecycleOwner) {
|
||||
if (it != null) {
|
||||
updateWater(0, it.value)
|
||||
updateWater(it.value)
|
||||
} else {
|
||||
updateWater(0, 1)
|
||||
updateWater(0)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun updateWater(oldValue: Int, newValue: Int) {
|
||||
private var oldValue = 0f
|
||||
|
||||
private fun updateWater(newValue: Int) {
|
||||
|
||||
val waterUnit =
|
||||
UnitFactory.volume(settings.getString("water_unit", "milliliter") ?: "Milliliter")
|
||||
@ -158,7 +161,6 @@ class HomeFragment : BaseFragment<HomeViewModel, FragmentHomeBinding>(HomeViewMo
|
||||
}
|
||||
|
||||
val graph = Bitmap.createBitmap(width, height, Bitmap.Config.ARGB_8888)
|
||||
Log.d("Test2", "$width $height")
|
||||
|
||||
val canvas = Canvas(graph)
|
||||
val rect = RectF(
|
||||
@ -194,27 +196,29 @@ class HomeFragment : BaseFragment<HomeViewModel, FragmentHomeBinding>(HomeViewMo
|
||||
3f
|
||||
)
|
||||
|
||||
ValueAnimator.ofInt(
|
||||
min(oldValue, viewModel.dailyWaterIntake),
|
||||
val animator = ValueAnimator.ofInt(
|
||||
min(this.oldValue, viewModel.dailyWaterIntake.toFloat()).toInt(),
|
||||
min(newValue, viewModel.dailyWaterIntake)
|
||||
).apply {
|
||||
duration = 300
|
||||
addUpdateListener {
|
||||
)
|
||||
animator.duration = 300 // ms
|
||||
animator.addUpdateListener {
|
||||
|
||||
DrawUtils.drawArc(
|
||||
canvas,
|
||||
100 * it.animatedValue as Int / viewModel.dailyWaterIntake.toFloat(),
|
||||
rect,
|
||||
MaterialColors.getColor(
|
||||
requireView(),
|
||||
com.google.android.material.R.attr.colorPrimary
|
||||
),
|
||||
6f
|
||||
)
|
||||
canvas.save()
|
||||
binding.background.setImageBitmap(graph)
|
||||
}
|
||||
start()
|
||||
this.oldValue = 100 * it.animatedValue as Int / viewModel.dailyWaterIntake.toFloat()
|
||||
Log.d("Test2", "${this.oldValue}")
|
||||
|
||||
DrawUtils.drawArc(
|
||||
canvas,
|
||||
max(this.oldValue, 1f),
|
||||
rect,
|
||||
MaterialColors.getColor(
|
||||
requireView(),
|
||||
com.google.android.material.R.attr.colorPrimary
|
||||
),
|
||||
6f
|
||||
)
|
||||
canvas.save()
|
||||
binding.background.setImageBitmap(graph)
|
||||
}
|
||||
animator.start()
|
||||
}
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ class AddWeightDialog : BaseDialog<HomeViewModel, DialogAddWeightBinding>(HomeVi
|
||||
builder.apply {
|
||||
setTitle("Add your weight (kg)")
|
||||
setIcon(activity?.let { ContextCompat.getDrawable(it, R.drawable.ic_outline_timeline_24) })
|
||||
setPositiveButton("Validate") { dialog, _ ->
|
||||
setPositiveButton("Validate") { _, _ ->
|
||||
save()
|
||||
}
|
||||
setNegativeButton("Cancel") { dialog, _ ->
|
||||
|
@ -1,12 +0,0 @@
|
||||
package com.dzeio.openhealth.utils
|
||||
|
||||
import androidx.fragment.app.Fragment
|
||||
|
||||
object NavigationUtils {
|
||||
|
||||
fun navigation(fragment: Fragment) {
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
<vector android:height="24dp"
|
||||
android:tint="?attr/colorControlNormal"
|
||||
android:viewportHeight="24" android:viewportWidth="24"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@android:color/white" android:pathData="M13.5,5.5c1.1,0 2,-0.9 2,-2s-0.9,-2 -2,-2 -2,0.9 -2,2 0.9,2 2,2zM9.8,8.9L7,23h2.1l1.8,-8 2.1,2v6h2v-7.5l-2.1,-2 0.6,-3C14.8,12 16.8,13 19,13v-2c-1.9,0 -3.5,-1 -4.3,-2.4l-1,-1.6c-0.4,-0.6 -1,-1 -1.7,-1 -0.3,0 -0.5,0.1 -0.8,0.1L6,8.3V13h2V9.6l1.8,-0.7"/>
|
||||
</vector>
|
5
app/src/main/res/drawable/ic_baseline_height_24.xml
Normal file
5
app/src/main/res/drawable/ic_baseline_height_24.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<vector android:height="24dp" android:tint="?attr/colorControlNormal"
|
||||
android:viewportHeight="24" android:viewportWidth="24"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@android:color/white" android:pathData="M13,6.99l3,0l-4,-3.99l-4,3.99l3,0l0,10.02l-3,0l4,3.99l4,-3.99l-3,0z"/>
|
||||
</vector>
|
5
app/src/main/res/drawable/ic_baseline_square_foot_24.xml
Normal file
5
app/src/main/res/drawable/ic_baseline_square_foot_24.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<vector android:height="24dp" android:tint="?attr/colorControlNormal"
|
||||
android:viewportHeight="24" android:viewportWidth="24"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@android:color/white" android:pathData="M17.66,17.66l-1.06,1.06l-0.71,-0.71l1.06,-1.06l-1.94,-1.94l-1.06,1.06l-0.71,-0.71l1.06,-1.06l-1.94,-1.94l-1.06,1.06l-0.71,-0.71l1.06,-1.06L9.7,9.7l-1.06,1.06l-0.71,-0.71l1.06,-1.06L7.05,7.05L5.99,8.11L5.28,7.4l1.06,-1.06L4,4v14c0,1.1 0.9,2 2,2h14L17.66,17.66zM7,17v-5.76L12.76,17H7z"/>
|
||||
</vector>
|
@ -1,12 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M12,12m-3.2,0a3.2,3.2 0,1 1,6.4 0a3.2,3.2 0,1 1,-6.4 0" />
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M9,2L7.17,4H4c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2V6c0,-1.1 -0.9,-2 -2,-2h-3.17L15,2H9zm3,15c-2.76,0 -5,-2.24 -5,-5s2.24,-5 5,-5 5,2.24 5,5 -2.24,5 -5,5z" />
|
||||
</vector>
|
@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M22,16V4c0,-1.1 -0.9,-2 -2,-2H8c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2zm-11,-4l2.03,2.71L16,11l4,5H8l3,-4zM2,6v14c0,1.1 0.9,2 2,2h14v-2H4V6H2z" />
|
||||
</vector>
|
@ -1,9 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M4,6H2v14c0,1.1 0.9,2 2,2h14v-2H4V6zm16,-4H8c-1.1,0 -2,0.9 -2,2v12c0,1.1 0.9,2 2,2h12c1.1,0 2,-0.9 2,-2V4c0,-1.1 -0.9,-2 -2,-2zm-8,12.5v-9l6,4.5 -6,4.5z" />
|
||||
</vector>
|
6
app/src/main/res/drawable/ic_outline_blender_24.xml
Normal file
6
app/src/main/res/drawable/ic_outline_blender_24.xml
Normal file
@ -0,0 +1,6 @@
|
||||
<vector android:height="24dp" android:tint="?attr/colorControlNormal"
|
||||
android:viewportHeight="24" android:viewportWidth="24"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@android:color/white" android:pathData="M16.13,15.13L18,3h-4V2h-4v1H5C3.9,3 3,3.9 3,5v4c0,1.1 0.9,2 2,2h2.23l0.64,4.13C6.74,16.05 6,17.43 6,19v1c0,1.1 0.9,2 2,2h8c1.1,0 2,-0.9 2,-2v-1C18,17.43 17.26,16.05 16.13,15.13zM5,9V5h1.31l0.62,4H5zM15.67,5l-1.38,9H9.72L8.33,5H15.67zM16,20H8v-1c0,-1.65 1.35,-3 3,-3h2c1.65,0 3,1.35 3,3V20z"/>
|
||||
<path android:fillColor="@android:color/white" android:pathData="M12,18m-1,0a1,1 0,1 1,2 0a1,1 0,1 1,-2 0"/>
|
||||
</vector>
|
5
app/src/main/res/drawable/ic_outline_fastfood_24.xml
Normal file
5
app/src/main/res/drawable/ic_outline_fastfood_24.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<vector android:height="24dp" android:tint="?attr/colorControlNormal"
|
||||
android:viewportHeight="24" android:viewportWidth="24"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@android:color/white" android:pathData="M1,21.98c0,0.56 0.45,1.01 1.01,1.01H15c0.56,0 1.01,-0.45 1.01,-1.01V21H1v0.98zM8.5,8.99C4.75,8.99 1,11 1,15h15c0,-4 -3.75,-6.01 -7.5,-6.01zM3.62,13c1.11,-1.55 3.47,-2.01 4.88,-2.01s3.77,0.46 4.88,2.01H3.62zM1,17h15v2H1zM18,5V1h-2v4h-5l0.23,2h9.56l-1.4,14H18v2h1.72c0.84,0 1.53,-0.65 1.63,-1.47L23,5h-5z"/>
|
||||
</vector>
|
5
app/src/main/res/drawable/ic_outline_favorite_24.xml
Normal file
5
app/src/main/res/drawable/ic_outline_favorite_24.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<vector android:height="24dp" android:tint="?attr/colorControlNormal"
|
||||
android:viewportHeight="24" android:viewportWidth="24"
|
||||
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<path android:fillColor="@android:color/white" android:pathData="M16.5,3c-1.74,0 -3.41,0.81 -4.5,2.09C10.91,3.81 9.24,3 7.5,3 4.42,3 2,5.42 2,8.5c0,3.78 3.4,6.86 8.55,11.54L12,21.35l1.45,-1.32C18.6,15.36 22,12.28 22,8.5 22,5.42 19.58,3 16.5,3zM12.1,18.55l-0.1,0.1 -0.1,-0.1C7.14,14.24 4,11.39 4,8.5 4,6.5 5.5,5 7.5,5c1.54,0 3.04,0.99 3.57,2.36h1.87C13.46,5.99 14.96,5 16.5,5c2,0 3.5,1.5 3.5,3.5 0,2.89 -3.14,5.74 -7.9,10.05z"/>
|
||||
</vector>
|
5
app/src/main/res/drawable/shape_circle.xml
Normal file
5
app/src/main/res/drawable/shape_circle.xml
Normal file
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
|
||||
<solid android:color="?colorPrimary" />
|
||||
<size android:width="40dp" android:height="40dp" />
|
||||
</shape>
|
@ -1,5 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<corners android:radius="8dp" />
|
||||
<solid android:color="@color/black" />
|
||||
</shape>
|
@ -1,9 +0,0 @@
|
||||
<shape xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:shape="rectangle">
|
||||
<gradient
|
||||
android:angle="135"
|
||||
android:centerColor="#009688"
|
||||
android:endColor="#00695C"
|
||||
android:startColor="#4DB6AC"
|
||||
android:type="linear" />
|
||||
</shape>
|
@ -1,12 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="156dp"
|
||||
android:height="81dp"
|
||||
android:viewportWidth="156"
|
||||
android:viewportHeight="81">
|
||||
<path
|
||||
android:pathData="M153,78C153,36.579 119.421,3 78,3C36.579,3 3,36.579 3,78"
|
||||
android:strokeWidth="5"
|
||||
android:fillColor="#00000000"
|
||||
android:strokeColor="#C9C5CA"
|
||||
android:strokeLineCap="round"/>
|
||||
</vector>
|
@ -1,17 +1,19 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<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"
|
||||
>
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
android:id="@+id/coordinatorLayout"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toTopOf="@id/bottom_nav"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:context=".MainActivity">
|
||||
|
||||
<com.google.android.material.appbar.AppBarLayout
|
||||
@ -32,7 +34,6 @@
|
||||
<androidx.core.widget.NestedScrollView
|
||||
|
||||
android:layout_width="match_parent"
|
||||
|
||||
android:layout_height="match_parent"
|
||||
|
||||
app:layout_behavior="@string/appbar_scrolling_view_behavior">
|
||||
@ -55,13 +56,20 @@
|
||||
</androidx.coordinatorlayout.widget.CoordinatorLayout>
|
||||
|
||||
<com.google.android.material.bottomnavigation.BottomNavigationView
|
||||
android:layout_width="match_parent"
|
||||
android:id="@+id/bottom_nav"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintLeft_toLeftOf="parent"
|
||||
app:layout_constraintRight_toRightOf="parent"
|
||||
app:menu="@menu/bottom_menu" />
|
||||
|
||||
<androidx.constraintlayout.widget.Guideline
|
||||
android:id="@+id/guideline2"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
app:layout_constraintGuide_begin="20dp" />
|
||||
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
@ -18,6 +18,7 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/tagline"
|
||||
android:paddingBottom="16dp"
|
||||
android:textAlignment="center" />
|
||||
|
||||
<TextView
|
||||
@ -25,13 +26,18 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingVertical="8dp"
|
||||
android:focusable="true"
|
||||
android:clickable="true"
|
||||
android:drawablePadding="16dp"
|
||||
android:gravity="center_vertical"
|
||||
tools:text="Version 0.0.0"
|
||||
android:text="@string/version_number"
|
||||
app:drawableStartCompat="@drawable/ic_baseline_extension_24" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/github"
|
||||
android:focusable="true"
|
||||
android:clickable="true"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingVertical="8dp"
|
||||
@ -43,6 +49,8 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/contact_us"
|
||||
android:focusable="true"
|
||||
android:clickable="true"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingVertical="8dp"
|
||||
@ -54,6 +62,8 @@
|
||||
|
||||
<TextView
|
||||
android:id="@+id/licenses"
|
||||
android:focusable="true"
|
||||
android:clickable="true"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingVertical="8dp"
|
||||
|
@ -8,65 +8,11 @@
|
||||
android:layout_margin="16dp"
|
||||
tools:context=".ui.browse.BrowseFragment">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
<TextView
|
||||
android:text="Coming Soon"
|
||||
android:layout_gravity="center"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="8dp"
|
||||
android:layout_marginBottom="16dp">
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:src="@drawable/ic_baseline_add_24" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:text="Activity"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="?attr/materialCardViewFilledStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="8dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:src="@drawable/ic_baseline_add_24" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Steps" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="4500 of 5000 steps" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
/>
|
||||
|
||||
</LinearLayout>
|
||||
|
@ -1,308 +1,355 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<ScrollView
|
||||
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"
|
||||
android:orientation="vertical"
|
||||
android:layout_margin="16dp"
|
||||
tools:context=".ui.browse.BrowseFragment">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="8dp"
|
||||
android:layout_marginBottom="16dp">
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:src="@drawable/ic_baseline_add_24" />
|
||||
android:orientation="vertical"
|
||||
android:layout_margin="16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="8dp"
|
||||
android:layout_marginBottom="16dp">
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:src="@drawable/ic_baseline_directions_walk_24" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:text="Activity"
|
||||
/>
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:text="Activity"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="?attr/materialCardViewFilledStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:layout_marginBottom="16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
|
||||
android:paddingHorizontal="12dp"
|
||||
android:paddingVertical="16dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:paddingVertical="8dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:src="@drawable/ic_baseline_directions_walk_24"
|
||||
android:background="@drawable/shape_circle"
|
||||
app:tint="?colorOnPrimary" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="4dp"
|
||||
android:text="Steps" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="4500 of 5000 steps" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="8dp"
|
||||
android:layout_marginBottom="16dp">
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:src="@drawable/ic_baseline_add_24" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:text="Heart"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="?attr/materialCardViewFilledStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:layout_marginBottom="16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="12dp"
|
||||
android:paddingVertical="16dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:paddingVertical="8dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:src="@drawable/ic_outline_favorite_24"
|
||||
android:background="@drawable/shape_circle"
|
||||
app:tint="?colorOnPrimary" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Heart Rate" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="8dp"
|
||||
android:layout_marginBottom="16dp">
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:src="@drawable/ic_baseline_square_foot_24" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:text="Measurements"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="?attr/materialCardViewFilledStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:layout_marginBottom="16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="12dp"
|
||||
android:paddingVertical="16dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:paddingVertical="8dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:src="@drawable/ic_baseline_add_24"
|
||||
android:background="@drawable/shape_circle"
|
||||
app:tint="?colorOnPrimary" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Weight" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="?attr/materialCardViewFilledStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:layout_marginBottom="16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="12dp"
|
||||
android:paddingVertical="16dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:paddingVertical="8dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:src="@drawable/ic_baseline_height_24"
|
||||
android:background="@drawable/shape_circle"
|
||||
app:tint="?colorOnPrimary" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingBottom="4dp"
|
||||
android:text="Height" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Coming soon" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="8dp"
|
||||
android:layout_marginBottom="16dp">
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:src="@drawable/ic_outline_blender_24" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:text="Food"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="?attr/materialCardViewFilledStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:layout_marginBottom="16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="12dp"
|
||||
android:paddingVertical="16dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:paddingVertical="8dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:src="@drawable/ic_outline_local_drink_24"
|
||||
android:background="@drawable/shape_circle"
|
||||
app:tint="?colorOnPrimary" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Water Intake" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="?attr/materialCardViewFilledStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:clickable="true"
|
||||
android:focusable="true"
|
||||
android:layout_marginBottom="16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:paddingHorizontal="12dp"
|
||||
android:paddingVertical="16dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="40dp"
|
||||
android:layout_height="40dp"
|
||||
android:paddingVertical="8dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:src="@drawable/ic_outline_fastfood_24"
|
||||
android:background="@drawable/shape_circle"
|
||||
app:tint="?colorOnPrimary" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Food Calories" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="?attr/materialCardViewFilledStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="8dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:src="@drawable/ic_baseline_add_24" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Steps" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="4500 of 5000 steps" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="8dp"
|
||||
android:layout_marginBottom="16dp">
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:src="@drawable/ic_baseline_add_24" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:text="Heart"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="?attr/materialCardViewFilledStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="8dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:src="@drawable/ic_baseline_add_24" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Heart Rate" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="8dp"
|
||||
android:layout_marginBottom="16dp">
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:src="@drawable/ic_baseline_add_24" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:text="Measurements"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="?attr/materialCardViewFilledStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="8dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:src="@drawable/ic_baseline_add_24" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Weight" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="?attr/materialCardViewFilledStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="8dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:src="@drawable/ic_baseline_add_24" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Height" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Coming soon" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:paddingHorizontal="16dp"
|
||||
android:paddingVertical="8dp"
|
||||
android:layout_marginBottom="16dp">
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:src="@drawable/ic_baseline_add_24" />
|
||||
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="match_parent"
|
||||
android:text="Food"
|
||||
/>
|
||||
</LinearLayout>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="?attr/materialCardViewFilledStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="8dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:src="@drawable/ic_baseline_add_24" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Water Intake" />
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
<com.google.android.material.card.MaterialCardView
|
||||
style="?attr/materialCardViewFilledStyle"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="16dp">
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:padding="8dp">
|
||||
|
||||
<ImageView
|
||||
android:layout_width="24dp"
|
||||
android:layout_height="24dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:src="@drawable/ic_baseline_add_24" />
|
||||
|
||||
<LinearLayout
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical">
|
||||
|
||||
<TextView
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="Food Calories" />
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</LinearLayout>
|
||||
|
||||
</com.google.android.material.card.MaterialCardView>
|
||||
|
||||
</LinearLayout>
|
||||
</ScrollView>
|
||||
|
@ -3,21 +3,21 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
|
||||
<item
|
||||
android:id="@+id/action_dashboard"
|
||||
android:id="@+id/nav_home"
|
||||
android:icon="@drawable/ic_outline_home_24"
|
||||
android:title="@string/menu_dashboard" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_settings"
|
||||
android:id="@+id/nav_browse"
|
||||
android:title="@string/menu_browse"
|
||||
android:icon="@drawable/ic_outline_list_24"/>
|
||||
<item
|
||||
android:id="@+id/action_extensions"
|
||||
android:id="@+id/nav_activity"
|
||||
android:title="@string/menu_activity"
|
||||
android:icon="@drawable/ic_outline_calendar_today_24" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_about"
|
||||
android:id="@+id/nav_extensions"
|
||||
android:title="@string/menu_extensions"
|
||||
android:icon="@drawable/ic_outline_account_circle_24"/>
|
||||
</menu>
|
||||
|
@ -10,15 +10,11 @@
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_settings"
|
||||
android:id="@+id/nav_settings"
|
||||
android:title="@string/page_settings"
|
||||
android:icon="@drawable/ic_baseline_settings_24"/>
|
||||
<item
|
||||
android:id="@+id/action_extensions"
|
||||
android:title="@string/menu_extensions"
|
||||
android:icon="@drawable/ic_baseline_extension_24" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_about"
|
||||
android:id="@+id/nav_about"
|
||||
android:title="@string/about" />
|
||||
</menu>
|
||||
|
@ -3,13 +3,14 @@
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:id="@+id/mobile_navigation"
|
||||
android:label="@string/app_name"
|
||||
app:startDestination="@+id/nav_home">
|
||||
|
||||
<fragment
|
||||
android:id="@+id/nav_home"
|
||||
android:name="com.dzeio.openhealth.ui.home.HomeFragment"
|
||||
android:label="@string/menu_home"
|
||||
tools:layout="@layout/fragment_home" >
|
||||
tools:layout="@layout/fragment_home">
|
||||
<action
|
||||
android:id="@+id/action_nav_home_to_nav_list_weight"
|
||||
app:destination="@id/nav_list_weight"
|
||||
@ -17,13 +18,6 @@
|
||||
app:exitAnim="@android:anim/slide_out_right"
|
||||
app:popEnterAnim="@android:anim/slide_in_left"
|
||||
app:popExitAnim="@android:anim/slide_out_right" />
|
||||
<action
|
||||
android:id="@+id/action_nav_home_to_nav_extensions"
|
||||
app:destination="@id/nav_extensions"
|
||||
app:enterAnim="@android:anim/slide_in_left"
|
||||
app:exitAnim="@android:anim/slide_out_right"
|
||||
app:popEnterAnim="@android:anim/slide_in_left"
|
||||
app:popExitAnim="@android:anim/slide_out_right" />
|
||||
<action
|
||||
android:id="@+id/action_nav_home_to_nav_water_home"
|
||||
app:destination="@id/nav_water_home"
|
||||
@ -31,32 +25,16 @@
|
||||
app:exitAnim="@android:anim/slide_out_right"
|
||||
app:popEnterAnim="@android:anim/slide_in_left"
|
||||
app:popExitAnim="@android:anim/slide_out_right" />
|
||||
<action
|
||||
android:id="@+id/action_nav_home_to_nav_settings"
|
||||
app:destination="@id/nav_settings"
|
||||
app:enterAnim="@android:anim/slide_in_left"
|
||||
app:exitAnim="@android:anim/slide_out_right"
|
||||
app:popEnterAnim="@android:anim/slide_in_left"
|
||||
app:popExitAnim="@android:anim/slide_out_right" />
|
||||
<action
|
||||
android:id="@+id/action_nav_home_to_nav_add_weight_dialog"
|
||||
app:destination="@id/nav_add_weight_dialog" />
|
||||
<action
|
||||
android:id="@+id/action_nav_home_to_aboutFragment"
|
||||
app:destination="@id/aboutFragment" />
|
||||
<action
|
||||
android:id="@+id/action_nav_home_to_browseFragment"
|
||||
app:destination="@id/browseFragment" />
|
||||
<action
|
||||
android:id="@+id/action_nav_home_to_activityFragment"
|
||||
app:destination="@id/activityFragment" />
|
||||
</fragment>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/nav_extensions"
|
||||
android:name="com.dzeio.openhealth.ui.extensions.ExtensionsFragment"
|
||||
android:label="@string/menu_import"
|
||||
tools:layout="@layout/fragment_extensions" >
|
||||
android:label="@string/menu_extensions"
|
||||
tools:layout="@layout/fragment_extensions">
|
||||
<action
|
||||
android:id="@+id/action_nav_extensions_to_nav_extension"
|
||||
app:destination="@id/nav_extension" />
|
||||
@ -66,7 +44,7 @@
|
||||
android:id="@+id/nav_list_weight"
|
||||
android:name="com.dzeio.openhealth.ui.weight.ListWeightFragment"
|
||||
android:label="@string/weight"
|
||||
tools:layout="@layout/fragment_list_weight" >
|
||||
tools:layout="@layout/fragment_list_weight">
|
||||
<action
|
||||
android:id="@+id/action_nav_list_weight_to_nav_edit_weight"
|
||||
app:destination="@id/nav_edit_weight"
|
||||
@ -105,39 +83,39 @@
|
||||
app:popExitAnim="@android:anim/slide_out_right" />
|
||||
<action
|
||||
android:id="@+id/action_nav_water_home_to_nav_water_size_dialog"
|
||||
app:destination="@id/nav_water_size_dialog"
|
||||
app:enterAnim="@android:anim/slide_in_left"
|
||||
app:exitAnim="@android:anim/slide_out_right"
|
||||
app:popEnterAnim="@android:anim/slide_in_left"
|
||||
app:popExitAnim="@android:anim/slide_out_right"
|
||||
app:destination="@id/nav_water_size_dialog" />
|
||||
app:popExitAnim="@android:anim/slide_out_right" />
|
||||
</fragment>
|
||||
|
||||
<dialog
|
||||
android:id="@+id/nav_water_size_dialog"
|
||||
android:name="com.dzeio.openhealth.ui.water.WaterSizeSelectorDialog"
|
||||
tools:layout="@layout/dialog_water_size_selector"
|
||||
app:enterAnim="@android:anim/slide_in_left"
|
||||
app:exitAnim="@android:anim/slide_out_right"
|
||||
app:popEnterAnim="@android:anim/slide_in_left"
|
||||
app:popExitAnim="@android:anim/slide_out_right">
|
||||
app:popExitAnim="@android:anim/slide_out_right"
|
||||
tools:layout="@layout/dialog_water_size_selector">
|
||||
|
||||
</dialog>
|
||||
|
||||
<dialog
|
||||
android:id="@+id/nav_add_weight_dialog"
|
||||
android:name="com.dzeio.openhealth.ui.weight.AddWeightDialog"
|
||||
tools:layout="@layout/dialog_water_size_selector"
|
||||
app:enterAnim="@android:anim/slide_in_left"
|
||||
app:exitAnim="@android:anim/slide_out_right"
|
||||
app:popEnterAnim="@android:anim/slide_in_left"
|
||||
app:popExitAnim="@android:anim/slide_out_right">
|
||||
app:popExitAnim="@android:anim/slide_out_right"
|
||||
tools:layout="@layout/dialog_water_size_selector">
|
||||
|
||||
</dialog>
|
||||
|
||||
<fragment
|
||||
android:id="@+id/nav_settings"
|
||||
android:label="@string/page_settings"
|
||||
android:name="com.dzeio.openhealth.ui.settings.SettingsFragment"
|
||||
android:label="@string/page_settings"
|
||||
app:enterAnim="@android:anim/slide_in_left"
|
||||
app:exitAnim="@android:anim/slide_out_right"
|
||||
app:popEnterAnim="@android:anim/slide_in_left"
|
||||
@ -148,11 +126,11 @@
|
||||
<fragment
|
||||
android:id="@+id/nav_water_edit"
|
||||
android:name="com.dzeio.openhealth.ui.water.EditWaterDialog"
|
||||
tools:layout="@layout/dialog_water_edit_water"
|
||||
app:enterAnim="@android:anim/slide_in_left"
|
||||
app:exitAnim="@android:anim/slide_out_right"
|
||||
app:popEnterAnim="@android:anim/slide_in_left"
|
||||
app:popExitAnim="@android:anim/slide_out_right">
|
||||
app:popExitAnim="@android:anim/slide_out_right"
|
||||
tools:layout="@layout/dialog_water_edit_water">
|
||||
|
||||
<argument
|
||||
android:name="id"
|
||||
@ -163,11 +141,11 @@
|
||||
<fragment
|
||||
android:id="@+id/nav_extension"
|
||||
android:name="com.dzeio.openhealth.ui.extension.ExtensionFragment"
|
||||
tools:layout="@layout/fragment_extension"
|
||||
app:enterAnim="@android:anim/slide_in_left"
|
||||
app:exitAnim="@android:anim/slide_out_right"
|
||||
app:popEnterAnim="@android:anim/slide_in_left"
|
||||
app:popExitAnim="@android:anim/slide_out_right">
|
||||
app:popExitAnim="@android:anim/slide_out_right"
|
||||
tools:layout="@layout/fragment_extension">
|
||||
|
||||
<argument
|
||||
android:name="extension"
|
||||
@ -175,20 +153,27 @@
|
||||
|
||||
</fragment>
|
||||
<fragment
|
||||
android:id="@+id/aboutFragment"
|
||||
android:id="@+id/nav_about"
|
||||
android:name="com.dzeio.openhealth.ui.about.AboutFragment"
|
||||
android:label="AboutFragment"
|
||||
tools:layout="@layout/fragment_about"/>
|
||||
android:label="@string/about"
|
||||
tools:layout="@layout/fragment_about" />
|
||||
<fragment
|
||||
android:id="@+id/browseFragment"
|
||||
android:id="@+id/nav_browse"
|
||||
android:name="com.dzeio.openhealth.ui.browse.BrowseFragment"
|
||||
android:label="fragment_activity"
|
||||
tools:layout="@layout/fragment_activity" />
|
||||
android:label="@string/menu_browse"
|
||||
tools:layout="@layout/fragment_browse">
|
||||
<action
|
||||
android:id="@+id/action_nav_browse_to_nav_water_home"
|
||||
app:destination="@id/nav_water_home" />
|
||||
<action
|
||||
android:id="@+id/action_nav_browse_to_nav_list_weight"
|
||||
app:destination="@id/nav_list_weight" />
|
||||
</fragment>
|
||||
|
||||
|
||||
<fragment
|
||||
android:id="@+id/activityFragment"
|
||||
android:id="@+id/nav_activity"
|
||||
android:name="com.dzeio.openhealth.ui.activity.ActivityFragment"
|
||||
android:label="fragment_activity"
|
||||
android:label="@string/menu_activity"
|
||||
tools:layout="@layout/fragment_activity" />
|
||||
</navigation>
|
||||
|
@ -3,15 +3,14 @@ buildscript {
|
||||
dependencies {
|
||||
classpath 'com.google.dagger:hilt-android-gradle-plugin:2.40.5'
|
||||
|
||||
|
||||
// Safe Navigation
|
||||
classpath "androidx.navigation:navigation-safe-args-gradle-plugin:2.3.5"
|
||||
classpath 'androidx.navigation:navigation-safe-args-gradle-plugin:2.4.2'
|
||||
}
|
||||
}
|
||||
|
||||
plugins {
|
||||
id 'com.android.application' version '7.1.0-rc01' apply false
|
||||
id 'com.android.library' version '7.1.0-rc01' apply false
|
||||
id 'com.android.application' version '7.2.1' apply false
|
||||
id 'com.android.library' version '7.2.1' apply false
|
||||
id 'org.jetbrains.kotlin.android' version '1.6.10' apply false
|
||||
}
|
||||
|
||||
|
@ -22,4 +22,5 @@ kotlin.code.style=official
|
||||
# thereby reducing the size of the R class for that library
|
||||
android.nonTransitiveRClass=true
|
||||
|
||||
android.enableJetifier=true
|
||||
android.enableJetifier=false
|
||||
org.gradle.unsafe.configuration-cache=true
|
12
gradle/wrapper/gradle-wrapper.properties
vendored
12
gradle/wrapper/gradle-wrapper.properties
vendored
@ -1,6 +1,6 @@
|
||||
#Thu Dec 09 22:53:42 CET 2021
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-bin.zip
|
||||
distributionPath=wrapper/dists
|
||||
zipStorePath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
#Thu Jun 30 12:02:06 CEST 2022
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4.2-bin.zip
|
||||
distributionPath=wrapper/dists
|
||||
zipStorePath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
Loading…
x
Reference in New Issue
Block a user