Second Commit:
Version 1.5 [Partialy Optimized Version] [UI Fixes And Improvment] Todo: Optimized the Code Add String Theolgy
This commit is contained in:
8
.idea/deploymentTargetSelector.xml
generated
8
.idea/deploymentTargetSelector.xml
generated
@ -4,6 +4,14 @@
|
|||||||
<selectionStates>
|
<selectionStates>
|
||||||
<SelectionState runConfigName="app">
|
<SelectionState runConfigName="app">
|
||||||
<option name="selectionMode" value="DROPDOWN" />
|
<option name="selectionMode" value="DROPDOWN" />
|
||||||
|
<DropdownSelection timestamp="2025-01-20T15:38:25.025731500Z">
|
||||||
|
<Target type="DEFAULT_BOOT">
|
||||||
|
<handle>
|
||||||
|
<DeviceId pluginId="LocalEmulator" identifier="path=C:\Users\Dias Syahadatputra\.android\avd\Pixel_8_Pro_API_34.avd" />
|
||||||
|
</handle>
|
||||||
|
</Target>
|
||||||
|
</DropdownSelection>
|
||||||
|
<DialogSelection />
|
||||||
</SelectionState>
|
</SelectionState>
|
||||||
</selectionStates>
|
</selectionStates>
|
||||||
</component>
|
</component>
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:tools="http://schemas.android.com/tools">
|
xmlns:tools="http://schemas.android.com/tools">
|
||||||
|
|
||||||
|
<uses-permission android:name="android.permission.POST_NOTIFICATIONS" />
|
||||||
|
|
||||||
<application
|
<application
|
||||||
android:allowBackup="true"
|
android:allowBackup="true"
|
||||||
android:dataExtractionRules="@xml/data_extraction_rules"
|
android:dataExtractionRules="@xml/data_extraction_rules"
|
||||||
|
@ -75,35 +75,69 @@ class AlgoritmaKesehatan {
|
|||||||
val tasks = mutableListOf<Map<String, Any>>()
|
val tasks = mutableListOf<Map<String, Any>>()
|
||||||
|
|
||||||
// Task for Blood Sugar Control
|
// Task for Blood Sugar Control
|
||||||
if (healthData.bloodSugar > 140) {
|
when {
|
||||||
tasks.add(mapOf("task" to "Cek kadar gula darah 2 kali sehari.", "completed" to false))
|
healthData.bloodSugar > 140 -> {
|
||||||
tasks.add(mapOf("task" to "Kurangi konsumsi makanan tinggi gula.", "completed" to false))
|
tasks.add(mapOf("task" to "Kurangi konsumsi makanan tinggi gula dan karbohidrat olahan.", "completed" to false))
|
||||||
} else if (healthData.bloodSugar < 70) {
|
tasks.add(mapOf("task" to "Perbanyak konsumsi makanan berserat seperti sayuran dan biji-bijian.", "completed" to false))
|
||||||
tasks.add(mapOf("task" to "Sediakan camilan sehat seperti buah atau kacang.", "completed" to false))
|
tasks.add(mapOf("task" to "Lakukan olahraga ringan setelah makan untuk membantu mengontrol gula darah.", "completed" to false))
|
||||||
|
}
|
||||||
|
healthData.bloodSugar < 70 -> {
|
||||||
|
tasks.add(mapOf("task" to "Sediakan camilan sehat seperti buah atau kacang.", "completed" to false))
|
||||||
|
tasks.add(mapOf("task" to "Jangan melewatkan makan, usahakan makan dalam porsi kecil tapi sering.", "completed" to false))
|
||||||
|
tasks.add(mapOf("task" to "Konsumsi sumber karbohidrat kompleks untuk menjaga kadar gula tetap stabil.", "completed" to false))
|
||||||
|
}
|
||||||
|
else -> {
|
||||||
|
tasks.add(mapOf("task" to "Pertahankan pola makan sehat dan seimbang untuk menjaga kadar gula darah stabil.", "completed" to false))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Task for Blood Pressure Control
|
// Task for Blood Pressure Control
|
||||||
if (healthData.systolicBP > 120 || healthData.diastolicBP > 80) {
|
when {
|
||||||
tasks.add(mapOf("task" to "Lakukan olahraga ringan seperti jalan kaki selama 30 menit.", "completed" to false))
|
healthData.systolicBP > 120 || healthData.diastolicBP > 80 -> {
|
||||||
tasks.add(mapOf("task" to "Kurangi makanan asin dan berlemak.", "completed" to false))
|
tasks.add(mapOf("task" to "Lakukan olahraga ringan seperti jalan kaki selama 30 menit.", "completed" to false))
|
||||||
} else if (healthData.systolicBP < 90) {
|
tasks.add(mapOf("task" to "Kurangi konsumsi garam dan makanan berlemak.", "completed" to false))
|
||||||
tasks.add(mapOf("task" to "Perbanyak minum air putih dan istirahat.", "completed" to false))
|
tasks.add(mapOf("task" to "Konsumsi lebih banyak makanan tinggi kalium seperti pisang dan bayam.", "completed" to false))
|
||||||
|
}
|
||||||
|
healthData.systolicBP < 90 -> {
|
||||||
|
tasks.add(mapOf("task" to "Perbanyak minum air putih dan istirahat cukup.", "completed" to false))
|
||||||
|
tasks.add(mapOf("task" to "Konsumsi makanan bergizi yang bisa membantu menaikkan tekanan darah.", "completed" to false))
|
||||||
|
}
|
||||||
|
else -> {
|
||||||
|
tasks.add(mapOf("task" to "Jaga pola hidup sehat agar tekanan darah tetap stabil.", "completed" to false))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Task for BMI Control
|
// Task for BMI Control
|
||||||
if (healthData.BMI > 25) {
|
when {
|
||||||
tasks.add(mapOf("task" to "Lakukan olahraga rutin minimal 3 kali seminggu.", "completed" to false))
|
healthData.BMI > 25 -> {
|
||||||
tasks.add(mapOf("task" to "Konsumsi lebih banyak sayuran dan serat.", "completed" to false))
|
tasks.add(mapOf("task" to "Lakukan olahraga rutin minimal 3 kali seminggu.", "completed" to false))
|
||||||
} else if (healthData.BMI < 18.5) {
|
tasks.add(mapOf("task" to "Konsumsi lebih banyak sayuran dan serat.", "completed" to false))
|
||||||
tasks.add(mapOf("task" to "Tambahkan makanan tinggi kalori seperti kacang dan susu.", "completed" to false))
|
tasks.add(mapOf("task" to "Kurangi makanan tinggi lemak dan gula.", "completed" to false))
|
||||||
|
}
|
||||||
|
healthData.BMI < 18.5 -> {
|
||||||
|
tasks.add(mapOf("task" to "Tambahkan makanan tinggi kalori seperti kacang dan susu.", "completed" to false))
|
||||||
|
tasks.add(mapOf("task" to "Pastikan asupan protein dan karbohidrat mencukupi.", "completed" to false))
|
||||||
|
}
|
||||||
|
else -> {
|
||||||
|
tasks.add(mapOf("task" to "Pertahankan berat badan ideal dengan pola makan dan olahraga seimbang.", "completed" to false))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Age and Gender Specific Tasks
|
// Age and Gender Specific Tasks
|
||||||
if (healthData.age > 50) {
|
if (healthData.age > 50) {
|
||||||
tasks.add(mapOf("task" to "Lakukan pemeriksaan kesehatan rutin setiap bulan.", "completed" to false))
|
tasks.add(mapOf("task" to "Lakukan pemeriksaan kesehatan rutin setiap bulan.", "completed" to false))
|
||||||
|
tasks.add(mapOf("task" to "Jaga kesehatan tulang dengan konsumsi kalsium dan vitamin D.", "completed" to false))
|
||||||
}
|
}
|
||||||
if (healthData.gender == "Female" || healthData.gender == "Other") {
|
|
||||||
tasks.add(mapOf("task" to "Perhatikan kebutuhan kalsium dan zat besi.", "completed" to false))
|
when (healthData.gender) {
|
||||||
|
"Female", "Other" -> {
|
||||||
|
tasks.add(mapOf("task" to "Perhatikan kebutuhan kalsium dan zat besi, terutama saat menstruasi atau menopause.", "completed" to false))
|
||||||
|
tasks.add(mapOf("task" to "Pastikan mendapatkan asupan vitamin D yang cukup.", "completed" to false))
|
||||||
|
}
|
||||||
|
"Male" -> {
|
||||||
|
tasks.add(mapOf("task" to "Perhatikan kesehatan prostat dengan pola makan sehat.", "completed" to false))
|
||||||
|
tasks.add(mapOf("task" to "Jaga kesehatan jantung dengan olahraga teratur.", "completed" to false))
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return tasks
|
return tasks
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package com.healthjournal.data
|
package com.healthjournal.data
|
||||||
|
|
||||||
|
import com.google.android.gms.tasks.Task
|
||||||
import java.io.Serializable
|
import java.io.Serializable
|
||||||
|
|
||||||
|
|
||||||
@ -18,6 +19,7 @@ data class ResultData(
|
|||||||
val diastolicBP: Int,
|
val diastolicBP: Int,
|
||||||
val systolicBP: Int,
|
val systolicBP: Int,
|
||||||
val BMI: Float,
|
val BMI: Float,
|
||||||
val date: String
|
val date: String,
|
||||||
|
val task: List<Map<String, Any>>
|
||||||
) : Serializable
|
) : Serializable
|
||||||
|
|
||||||
|
@ -0,0 +1,27 @@
|
|||||||
|
package com.healthjournal.utils
|
||||||
|
|
||||||
|
import android.app.NotificationChannel
|
||||||
|
import android.app.NotificationManager
|
||||||
|
import android.content.Context
|
||||||
|
import android.os.Build
|
||||||
|
|
||||||
|
object NotificationUtils {
|
||||||
|
private const val CHANNEL_ID = "health_reminder_channel"
|
||||||
|
private const val CHANNEL_NAME = "Health Reminders"
|
||||||
|
|
||||||
|
fun createNotificationChannel(context: Context) {
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
||||||
|
val channel = NotificationChannel(
|
||||||
|
CHANNEL_ID,
|
||||||
|
CHANNEL_NAME,
|
||||||
|
NotificationManager.IMPORTANCE_HIGH
|
||||||
|
).apply {
|
||||||
|
description = "Reminders to check blood pressure and blood sugar"
|
||||||
|
}
|
||||||
|
|
||||||
|
val notificationManager: NotificationManager =
|
||||||
|
context.getSystemService(NotificationManager::class.java)
|
||||||
|
notificationManager.createNotificationChannel(channel)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,39 @@
|
|||||||
|
package com.healthjournal.receiver
|
||||||
|
|
||||||
|
import android.app.NotificationManager
|
||||||
|
import android.app.PendingIntent
|
||||||
|
import android.content.BroadcastReceiver
|
||||||
|
import android.content.Context
|
||||||
|
import android.content.Intent
|
||||||
|
import androidx.core.app.NotificationCompat
|
||||||
|
import com.healthjournal.R
|
||||||
|
import com.healthjournal.ui.dashboard.MainActivity
|
||||||
|
|
||||||
|
class ReminderReceiver : BroadcastReceiver() {
|
||||||
|
override fun onReceive(context: Context?, intent: Intent?) {
|
||||||
|
if (context != null) {
|
||||||
|
sendNotification(context)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private fun sendNotification(context: Context) {
|
||||||
|
val notificationManager =
|
||||||
|
context.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
|
||||||
|
|
||||||
|
val intent = Intent(context, MainActivity::class.java)
|
||||||
|
val pendingIntent = PendingIntent.getActivity(
|
||||||
|
context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE
|
||||||
|
)
|
||||||
|
|
||||||
|
val notification = NotificationCompat.Builder(context, "health_reminder_channel")
|
||||||
|
.setSmallIcon(R.drawable.ic_notifications)
|
||||||
|
.setContentTitle("Health Check Reminder")
|
||||||
|
.setContentText("Don't forget to check your blood pressure and sugar today!")
|
||||||
|
.setAutoCancel(true)
|
||||||
|
.setContentIntent(pendingIntent)
|
||||||
|
.setPriority(NotificationCompat.PRIORITY_HIGH)
|
||||||
|
.build()
|
||||||
|
|
||||||
|
notificationManager.notify(1001, notification)
|
||||||
|
}
|
||||||
|
}
|
@ -1,5 +1,8 @@
|
|||||||
package com.healthjournal.ui.dashboard
|
package com.healthjournal.ui.dashboard
|
||||||
|
|
||||||
|
import android.app.AlarmManager
|
||||||
|
import android.app.PendingIntent
|
||||||
|
import android.content.Context
|
||||||
import android.content.Intent
|
import android.content.Intent
|
||||||
import android.os.Bundle
|
import android.os.Bundle
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
@ -7,6 +10,7 @@ import android.view.View
|
|||||||
import android.widget.Toast
|
import android.widget.Toast
|
||||||
import androidx.appcompat.app.AppCompatActivity
|
import androidx.appcompat.app.AppCompatActivity
|
||||||
import androidx.recyclerview.widget.LinearLayoutManager
|
import androidx.recyclerview.widget.LinearLayoutManager
|
||||||
|
import com.google.android.material.bottomnavigation.BottomNavigationView
|
||||||
import com.google.firebase.Firebase
|
import com.google.firebase.Firebase
|
||||||
import com.google.firebase.auth.FirebaseAuth
|
import com.google.firebase.auth.FirebaseAuth
|
||||||
import com.google.firebase.database.FirebaseDatabase
|
import com.google.firebase.database.FirebaseDatabase
|
||||||
@ -14,46 +18,98 @@ import com.google.firebase.database.database
|
|||||||
import com.healthjournal.R
|
import com.healthjournal.R
|
||||||
import com.healthjournal.data.ResultData
|
import com.healthjournal.data.ResultData
|
||||||
import com.healthjournal.databinding.ActivityMainBinding
|
import com.healthjournal.databinding.ActivityMainBinding
|
||||||
|
import com.healthjournal.receiver.ReminderReceiver
|
||||||
import com.healthjournal.ui.journal.input.JournalInputActivity
|
import com.healthjournal.ui.journal.input.JournalInputActivity
|
||||||
import com.healthjournal.ui.login.LoginActivity
|
import com.healthjournal.ui.login.LoginActivity
|
||||||
import com.healthjournal.ui.profile.ProfileActivity
|
import com.healthjournal.ui.profile.ProfileActivity
|
||||||
import com.healthjournal.ui.recommendation.RecommendationActivity
|
import com.healthjournal.ui.recommendation.RecommendationActivity
|
||||||
|
import com.healthjournal.utils.NotificationUtils
|
||||||
import java.text.SimpleDateFormat
|
import java.text.SimpleDateFormat
|
||||||
import java.util.Calendar
|
import java.util.Calendar
|
||||||
import java.util.Locale
|
import java.util.Locale
|
||||||
|
|
||||||
|
|
||||||
class MainActivity : AppCompatActivity() {
|
class MainActivity : AppCompatActivity() {
|
||||||
private lateinit var binding: ActivityMainBinding
|
private lateinit var binding: ActivityMainBinding
|
||||||
private lateinit var user: FirebaseAuth
|
private lateinit var user: FirebaseAuth
|
||||||
private lateinit var mainAdapter: MainAdapter
|
private lateinit var mainAdapter: MainAdapter
|
||||||
|
private lateinit var database: FirebaseDatabase
|
||||||
private val healthDataList: MutableList<ResultData> = mutableListOf()
|
private val healthDataList: MutableList<ResultData> = mutableListOf()
|
||||||
private val database = Firebase.database
|
|
||||||
private var dailyReport = false
|
private var dailyReport = false
|
||||||
|
|
||||||
override fun onCreate(savedInstanceState: Bundle?) {
|
override fun onCreate(savedInstanceState: Bundle?) {
|
||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
binding = ActivityMainBinding.inflate(layoutInflater)
|
binding = ActivityMainBinding.inflate(layoutInflater)
|
||||||
|
// Create notification channel
|
||||||
|
NotificationUtils.createNotificationChannel(this)
|
||||||
|
|
||||||
|
// Schedule reminders
|
||||||
|
scheduleHealthReminders(this)
|
||||||
|
|
||||||
setContentView(binding.root)
|
setContentView(binding.root)
|
||||||
user = FirebaseAuth.getInstance()
|
user = FirebaseAuth.getInstance()
|
||||||
|
database = FirebaseDatabase.getInstance()
|
||||||
userCheck()
|
userCheck()
|
||||||
setupListener()
|
setupListener()
|
||||||
populateHistory()
|
populateHistory()
|
||||||
navigationBottomBar()
|
navigationBottomBar()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun navigationBottomBar(){
|
private fun scheduleHealthReminders(context: Context) {
|
||||||
binding.bottomNavigation.setOnItemSelectedListener {
|
val alarmManager = context.getSystemService(Context.ALARM_SERVICE) as AlarmManager
|
||||||
when(it.itemId){
|
|
||||||
R.id.nav_add -> addJournal()
|
val daysOfWeek = listOf(Calendar.MONDAY, Calendar.WEDNESDAY, Calendar.FRIDAY)
|
||||||
R.id.nav_home -> home()
|
for (day in daysOfWeek.shuffled().take(3)) {
|
||||||
R.id.nav_profile -> profile()
|
val calendar = Calendar.getInstance().apply {
|
||||||
|
set(Calendar.DAY_OF_WEEK, day)
|
||||||
|
set(Calendar.HOUR_OF_DAY, 9) // Set reminder at 9 AM
|
||||||
|
set(Calendar.MINUTE, 0)
|
||||||
|
set(Calendar.SECOND, 0)
|
||||||
}
|
}
|
||||||
true
|
|
||||||
|
val intent = Intent(context, ReminderReceiver::class.java)
|
||||||
|
val pendingIntent = PendingIntent.getBroadcast(
|
||||||
|
context, day, intent, PendingIntent.FLAG_UPDATE_CURRENT or PendingIntent.FLAG_IMMUTABLE
|
||||||
|
)
|
||||||
|
|
||||||
|
alarmManager.setRepeating(
|
||||||
|
AlarmManager.RTC_WAKEUP,
|
||||||
|
calendar.timeInMillis,
|
||||||
|
AlarmManager.INTERVAL_DAY * 7, // Repeat every week
|
||||||
|
pendingIntent
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private fun navigationBottomBar() {
|
||||||
|
val bottomNav = findViewById<BottomNavigationView>(R.id.nav_view)
|
||||||
|
|
||||||
|
bottomNav.setOnItemSelectedListener { item ->
|
||||||
|
when (item.itemId) {
|
||||||
|
R.id.nav_home -> {
|
||||||
|
finish()
|
||||||
|
startActivity(intent)
|
||||||
|
overridePendingTransition(0, 0)
|
||||||
|
true
|
||||||
|
}
|
||||||
|
R.id.nav_profile -> {
|
||||||
|
startActivity(Intent(this, ProfileActivity::class.java))
|
||||||
|
true
|
||||||
|
}
|
||||||
|
else -> false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.ivAdd.setOnClickListener {
|
||||||
|
if (dailyReport) {
|
||||||
|
Toast.makeText(this, "Daily Report Already Created", Toast.LENGTH_SHORT).show()
|
||||||
|
} else {
|
||||||
|
startActivity(Intent(this, JournalInputActivity::class.java))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
private fun getWeekCount() {
|
private fun getWeekCount() {
|
||||||
val today = Calendar.getInstance()
|
val today = Calendar.getInstance()
|
||||||
val userID = user.currentUser!!.uid
|
val userID = user.currentUser!!.uid
|
||||||
@ -116,6 +172,7 @@ class MainActivity : AppCompatActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun dailycheck() {
|
private fun dailycheck() {
|
||||||
|
getWeekCount()
|
||||||
val today = SimpleDateFormat("dd/MM/yyyy", Locale.getDefault()).format(android.icu.util.Calendar.getInstance().time).toString()
|
val today = SimpleDateFormat("dd/MM/yyyy", Locale.getDefault()).format(android.icu.util.Calendar.getInstance().time).toString()
|
||||||
val userID = user.currentUser!!.uid
|
val userID = user.currentUser!!.uid
|
||||||
database.getReference("users").child(userID).child("journal").get().addOnCompleteListener { task ->
|
database.getReference("users").child(userID).child("journal").get().addOnCompleteListener { task ->
|
||||||
@ -124,7 +181,8 @@ class MainActivity : AppCompatActivity() {
|
|||||||
if (it.child("date").value.toString() == today) {
|
if (it.child("date").value.toString() == today) {
|
||||||
dailyReport = true
|
dailyReport = true
|
||||||
switchLayout()
|
switchLayout()
|
||||||
populateTodayReport()
|
val referencePath = it.key ?: return@forEach
|
||||||
|
populateTodayReport(referencePath)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -158,9 +216,12 @@ class MainActivity : AppCompatActivity() {
|
|||||||
val user = FirebaseAuth.getInstance().currentUser
|
val user = FirebaseAuth.getInstance().currentUser
|
||||||
if (user == null) {
|
if (user == null) {
|
||||||
Toast.makeText(this, "Please Login to an account", Toast.LENGTH_SHORT).show()
|
Toast.makeText(this, "Please Login to an account", Toast.LENGTH_SHORT).show()
|
||||||
|
|
||||||
|
// Redirect to LoginActivity
|
||||||
val intent = Intent(this, LoginActivity::class.java)
|
val intent = Intent(this, LoginActivity::class.java)
|
||||||
startActivity(intent)
|
startActivity(intent)
|
||||||
finish()
|
finish()
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(this, "Welcome back!", Toast.LENGTH_SHORT).show()
|
Toast.makeText(this, "Welcome back!", Toast.LENGTH_SHORT).show()
|
||||||
dailycheck()
|
dailycheck()
|
||||||
@ -183,14 +244,15 @@ class MainActivity : AppCompatActivity() {
|
|||||||
if (task.isSuccessful) {
|
if (task.isSuccessful) {
|
||||||
healthDataList.clear()
|
healthDataList.clear()
|
||||||
task.result.children.forEach { snapshot ->
|
task.result.children.forEach { snapshot ->
|
||||||
val journalID = snapshot.child("date").value.toString()
|
val journalID = snapshot.key.toString()
|
||||||
val bloodSugar = snapshot.child("bloodSugar").value.toString().toFloatOrNull() ?: 0f
|
val bloodSugar = snapshot.child("bloodSugar").value.toString().toFloatOrNull() ?: 0f
|
||||||
val diastolicBP = snapshot.child("bloodPressureDIA").value.toString().toIntOrNull() ?: 0
|
val diastolicBP = snapshot.child("bloodPressureDIA").value.toString().toIntOrNull() ?: 0
|
||||||
val systolicBP = snapshot.child("bloodPressureSYS").value.toString().toIntOrNull() ?: 0
|
val systolicBP = snapshot.child("bloodPressureSYS").value.toString().toIntOrNull() ?: 0
|
||||||
val BMI = snapshot.child("bmi").value.toString().toFloatOrNull() ?: 0f
|
val BMI = snapshot.child("bmi").value.toString().toFloatOrNull() ?: 0f
|
||||||
val date = snapshot.child("date").value.toString()
|
val date = snapshot.child("date").value.toString()
|
||||||
|
val task = snapshot.child("recommendation").child("task").value as? List<Map<String, Any>> ?: emptyList()
|
||||||
|
|
||||||
val resultData = ResultData(journalID, bloodSugar, diastolicBP, systolicBP, BMI, date)
|
val resultData = ResultData(journalID, bloodSugar, diastolicBP, systolicBP, BMI, date, task)
|
||||||
healthDataList.add(resultData)
|
healthDataList.add(resultData)
|
||||||
}
|
}
|
||||||
mainAdapter.notifyDataSetChanged()
|
mainAdapter.notifyDataSetChanged()
|
||||||
@ -202,24 +264,19 @@ class MainActivity : AppCompatActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private fun populateTodayReport(){
|
private fun populateTodayReport(referencePath: String){
|
||||||
val today = SimpleDateFormat("dd/MM/yyyy", Locale.getDefault()).format(android.icu.util.Calendar.getInstance().time).toString()
|
|
||||||
val userID = user.currentUser!!.uid
|
val userID = user.currentUser!!.uid
|
||||||
database.getReference("users").child(userID).child("journal").get().addOnCompleteListener { task ->
|
database.getReference("users").child(userID).child("journal").child(referencePath).get().addOnCompleteListener {
|
||||||
if (task.isSuccessful) {
|
if (it.isSuccessful) {
|
||||||
task.result.children.forEach {
|
binding.tvBloodsugarLevel.text = it.result.child("bloodSugar").value.toString()+" mg/dL"
|
||||||
if (it.child("date").value.toString() == today) {
|
binding.tvBloodsugarDesc.text = it.result.child("recommendation").child("bloodSugarAnalysis").value.toString()
|
||||||
binding.tvBloodsugarLevel.text = it.child("bloodSugar").value.toString()+" mg/dL"
|
binding.tvBloodpressureLevel.text = it.result.child("bloodPressureDIA").value.toString()+"/"+it.result.child("bloodPressureSYS").value.toString()+" mm Hg"
|
||||||
binding.tvBloodsugarDesc.text = it.child("recommendation").child("bloodSugarAnalysis").value.toString()
|
binding.tvBloodpressureDesc.text = it.result.child("recommendation").child("bloodPressureAnalysis").value.toString()
|
||||||
binding.tvBloodpressureLevel.text = it.child("bloodPressureDIA").value.toString()+"/"+it.child("bloodPressureSYS").value.toString()+" mm Hg"
|
binding.tvBmiLevel.text = it.result.child("BMI").value.toString() +" BMI"
|
||||||
binding.tvBloodpressureDesc.text = it.child("recommendation").child("bloodPressureAnalysis").value.toString()
|
binding.tvBmiDesc.text = it.result.child("recommendation").child("BMIAnalysis").value.toString()
|
||||||
binding.tvBmiLevel.text = it.child("BMI").value.toString() +" BMI"
|
|
||||||
binding.tvBmiDesc.text = it.child("recommendation").child("BMIAnalysis").value.toString()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
Log.d("error", task.exception!!.message.toString())
|
Log.d("error", it.exception!!.message.toString())
|
||||||
Toast.makeText(this, task.exception!!.message, Toast.LENGTH_SHORT).show()
|
Toast.makeText(this, it.exception!!.message, Toast.LENGTH_SHORT).show()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -19,6 +19,7 @@ class MainAdapter(private val healthDataList: MutableList<ResultData>) : Recycle
|
|||||||
val tvDate: TextView = view.findViewById(R.id.tv_date)
|
val tvDate: TextView = view.findViewById(R.id.tv_date)
|
||||||
val tvBloodSugar: TextView = view.findViewById(R.id.tv_BS_Level)
|
val tvBloodSugar: TextView = view.findViewById(R.id.tv_BS_Level)
|
||||||
val tvBloodPressure: TextView = view.findViewById(R.id.tv_BP_Level)
|
val tvBloodPressure: TextView = view.findViewById(R.id.tv_BP_Level)
|
||||||
|
val tvGoals: TextView = view.findViewById(R.id.tv_goals_count)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Function to update the list and notify the adapter
|
// Function to update the list and notify the adapter
|
||||||
@ -48,8 +49,19 @@ class MainAdapter(private val healthDataList: MutableList<ResultData>) : Recycle
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun countGoals (){
|
private fun countGoals (list: List<Map<String, Any>>): String {
|
||||||
|
var completedGoals = 0
|
||||||
|
var goalsCount = 0
|
||||||
|
for (item in list) {
|
||||||
|
if (item["completed"] == true) {
|
||||||
|
completedGoals++
|
||||||
|
}
|
||||||
|
goalsCount++
|
||||||
|
}
|
||||||
|
if (completedGoals == 0) {
|
||||||
|
return "No goals completed"
|
||||||
|
}
|
||||||
|
return "$completedGoals/$goalsCount goals completed"
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onBindViewHolder(holder: HealthViewHolder, position: Int) {
|
override fun onBindViewHolder(holder: HealthViewHolder, position: Int) {
|
||||||
@ -59,11 +71,11 @@ class MainAdapter(private val healthDataList: MutableList<ResultData>) : Recycle
|
|||||||
holder.tvDate.text = healthData.date
|
holder.tvDate.text = healthData.date
|
||||||
holder.tvBloodSugar.text = "${healthData.bloodSugar} mg/dL"
|
holder.tvBloodSugar.text = "${healthData.bloodSugar} mg/dL"
|
||||||
holder.tvBloodPressure.text = "${healthData.diastolicBP}/${healthData.systolicBP} mm Hg"
|
holder.tvBloodPressure.text = "${healthData.diastolicBP}/${healthData.systolicBP} mm Hg"
|
||||||
|
holder.tvGoals.text = countGoals(healthData.task)
|
||||||
holder.itemView.setOnClickListener {
|
holder.itemView.setOnClickListener {
|
||||||
val context = holder.itemView.context
|
val context = holder.itemView.context
|
||||||
val intent = Intent(context, DetailJournalActivity::class.java).apply {
|
val intent = Intent(context, DetailJournalActivity::class.java).apply {
|
||||||
putExtra("HEALTH_DATA", healthData)
|
putExtra("JOURNAL_KEY", healthData.journalID)
|
||||||
}
|
}
|
||||||
context.startActivity(intent)
|
context.startActivity(intent)
|
||||||
}
|
}
|
||||||
|
@ -23,47 +23,70 @@ class DetailJournalActivity : AppCompatActivity() {
|
|||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
binding = ActivityDetailJournalBinding.inflate(layoutInflater)
|
binding = ActivityDetailJournalBinding.inflate(layoutInflater)
|
||||||
setContentView(binding.root)
|
setContentView(binding.root)
|
||||||
val healthData = intent.getSerializableExtra("HEALTH_DATA") as? ResultData
|
user = FirebaseAuth.getInstance()
|
||||||
|
setupListener()
|
||||||
|
populateDetailJournal()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun countGoals(taskList: List<Map<String, Any>>): String {
|
||||||
|
var completedGoals = 0
|
||||||
|
val totalGoals = taskList.size
|
||||||
|
|
||||||
|
for (task in taskList) {
|
||||||
|
val isCompleted = task["completed"] as? Boolean ?: false
|
||||||
|
if (isCompleted) {
|
||||||
|
completedGoals++
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return when {
|
||||||
|
totalGoals == 0 -> "No goals available"
|
||||||
|
completedGoals == 0 -> "No goals completed"
|
||||||
|
else -> "$completedGoals/$totalGoals goals completed"
|
||||||
|
}
|
||||||
|
}
|
||||||
private fun populateDetailJournal() {
|
private fun populateDetailJournal() {
|
||||||
val userID = user.currentUser?.uid
|
val userID = user.currentUser?.uid
|
||||||
val journalDate = intent.getStringExtra("JOURNAL_DATE")
|
val journalID = intent.getStringExtra("JOURNAL_KEY")
|
||||||
if (userID != null && journalDate != null) {
|
|
||||||
database.getReference("users").child(userID).child("journal").child(journalDate).get()
|
if (userID != null && journalID != null) {
|
||||||
.addOnCompleteListener(DetailJournalActivity()) {
|
database.getReference("users").child(userID).child("journal").child(journalID).get()
|
||||||
if (it.isSuccessful) {
|
.addOnCompleteListener(this) { task ->
|
||||||
val data = it.result
|
if (task.isSuccessful) {
|
||||||
if (data != null) {
|
val result = task.result
|
||||||
/*
|
if (result.exists()) {
|
||||||
binding.tvBloodsugarLevel2.text = data.bloodSugarLevel
|
binding.tvBloodsugarLevel2.text = "${result.child("bloodSugar").value ?: "N/A"} mg/dL"
|
||||||
binding.tvBloodsugarDesc.text = data.bloodSugarDesc
|
binding.tvBloodsugarDesc.text = result.child("recommendation").child("bloodSugarAnalysis").value?.toString() ?: "No data"
|
||||||
binding.tvBloodpressureLevel2.text = data.bloodPressureLevel
|
binding.tvBloodpressureLevel2.text = "${result.child("bloodPressureDIA").value ?: "N/A"}/${result.child("bloodPressureSYS").value ?: "N/A"} mm Hg"
|
||||||
binding.tvBloodpressureDesc.text = data.bloodPressureDesc
|
binding.tvBloodpressureDesc.text = result.child("recommendation").child("bloodPressureAnalysis").value?.toString() ?: "No data"
|
||||||
binding.tvBMILevel2.text = data.bmiLevel
|
binding.tvBMILevel2.text = "${result.child("BMI").value ?: "N/A"} BMI"
|
||||||
binding.tvBMIDesc.text = data.bmiDesc
|
binding.tvBMIDesc.text = result.child("recommendation").child("BMIAnalysis").value?.toString() ?: "No data"
|
||||||
binding.tvGoals2.text = countGoalsCompleted(data.goalsCompleted)
|
binding.tvJournalNote.text = result.child("note").value?.toString() ?: "No notes available"
|
||||||
binding.tvJournalNote.text = data.journalNote
|
|
||||||
*/
|
val taskListSnapshot = result.child("recommendation").child("tasks")
|
||||||
|
Log.d("debug", taskListSnapshot.toString())
|
||||||
|
val taskList = mutableListOf<Map<String, Any>>()
|
||||||
|
if (taskListSnapshot.exists()) {
|
||||||
|
for (taskSnapshot in taskListSnapshot.children) {
|
||||||
|
val taskMap = taskSnapshot.value as? Map<String, Any>
|
||||||
|
if (taskMap != null) {
|
||||||
|
taskList.add(taskMap)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
binding.tvGoals2.text = countGoals(taskList)
|
||||||
|
} else {
|
||||||
|
Toast.makeText(this, "No journal entry found.", Toast.LENGTH_SHORT).show()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Toast.makeText(this, it.exception!!.message, Toast.LENGTH_SHORT).show()
|
Toast.makeText(this, task.exception?.message ?: "Error fetching data", Toast.LENGTH_SHORT).show()
|
||||||
Log.d("error", it.exception!!.message.toString())
|
Log.d("error", task.exception?.message.toString())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun countGoalsCompleted(goalsCompleted: List<Boolean>): String {
|
|
||||||
var count = 0
|
|
||||||
for (completed in goalsCompleted) {
|
|
||||||
if (completed) {
|
|
||||||
count++
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return count.toString()
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun deleteHistory() {
|
private fun deleteHistory() {
|
||||||
val userID = user.currentUser?.uid
|
val userID = user.currentUser?.uid
|
||||||
|
@ -24,10 +24,14 @@ class ProfileActivity : AppCompatActivity() {
|
|||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
binding = ActivityProfileBinding.inflate(layoutInflater)
|
binding = ActivityProfileBinding.inflate(layoutInflater)
|
||||||
setContentView(binding.root)
|
setContentView(binding.root)
|
||||||
|
|
||||||
|
user = FirebaseAuth.getInstance()
|
||||||
|
|
||||||
setupListener()
|
setupListener()
|
||||||
populateData()
|
populateData()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private fun setupListener() {
|
private fun setupListener() {
|
||||||
binding.btnLogout.setOnClickListener {
|
binding.btnLogout.setOnClickListener {
|
||||||
logout()
|
logout()
|
||||||
@ -47,13 +51,11 @@ class ProfileActivity : AppCompatActivity() {
|
|||||||
private fun updateData(){
|
private fun updateData(){
|
||||||
val userID = user.currentUser?.uid
|
val userID = user.currentUser?.uid
|
||||||
val name = binding.edtName.text.toString()
|
val name = binding.edtName.text.toString()
|
||||||
val email = binding.edtEmail.text.toString()
|
val date = binding.edtDate.text.toString()
|
||||||
val date = binding.edtDates.text.toString()
|
|
||||||
val weight = binding.edtInputWeight.text.toString()
|
val weight = binding.edtInputWeight.text.toString()
|
||||||
val height = binding.edtInputHeight.text.toString()
|
val height = binding.edtInputHeight.text.toString()
|
||||||
val userRef = database.getReference("users").child(userID!!)
|
val userRef = database.getReference("users").child(userID!!)
|
||||||
userRef.child("name").setValue(name)
|
userRef.child("name").setValue(name)
|
||||||
userRef.child("email").setValue(email)
|
|
||||||
userRef.child("date").setValue(date)
|
userRef.child("date").setValue(date)
|
||||||
userRef.child("weight").setValue(weight)
|
userRef.child("weight").setValue(weight)
|
||||||
userRef.child("height").setValue(height)
|
userRef.child("height").setValue(height)
|
||||||
@ -61,13 +63,14 @@ class ProfileActivity : AppCompatActivity() {
|
|||||||
populateData()
|
populateData()
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun populateData(){
|
private fun populateData() {
|
||||||
val userID = user.currentUser?.uid
|
val userID = user.currentUser?.uid ?: return
|
||||||
val userRef = database.getReference("users").child(userID!!)
|
val userRef = database.getReference("users").child(userID)
|
||||||
userRef.get().addOnCompleteListener(ProfileActivity()){
|
|
||||||
if (it.isSuccessful){
|
userRef.get().addOnCompleteListener(this) {
|
||||||
|
if (it.isSuccessful) {
|
||||||
binding.edtName.setText(it.result.child("name").value.toString())
|
binding.edtName.setText(it.result.child("name").value.toString())
|
||||||
binding.edtDates.setText(it.result.child("date").value.toString())
|
binding.edtDate.setText(it.result.child("date").value.toString())
|
||||||
binding.edtInputHeight.setText(it.result.child("height").value.toString())
|
binding.edtInputHeight.setText(it.result.child("height").value.toString())
|
||||||
binding.edtInputWeight.setText(it.result.child("weight").value.toString())
|
binding.edtInputWeight.setText(it.result.child("weight").value.toString())
|
||||||
} else {
|
} else {
|
||||||
@ -78,4 +81,5 @@ class ProfileActivity : AppCompatActivity() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
5
app/src/main/res/drawable/baseline_add_circle_24.xml
Normal file
5
app/src/main/res/drawable/baseline_add_circle_24.xml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="60dp" android:tint="#000000" android:viewportHeight="24" android:viewportWidth="24" android:width="60dp">
|
||||||
|
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M12,2C6.48,2 2,6.48 2,12s4.48,10 10,10 10,-4.48 10,-10S17.52,2 12,2zM17,13h-4v4h-2v-4L7,13v-2h4L11,7h2v4h4v2z"/>
|
||||||
|
|
||||||
|
</vector>
|
11
app/src/main/res/drawable/bg_dashboard.xml
Normal file
11
app/src/main/res/drawable/bg_dashboard.xml
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item>
|
||||||
|
<shape android:shape="rectangle">
|
||||||
|
<solid android:color="@color/Accent_Dark_Gray"/>
|
||||||
|
<stroke
|
||||||
|
android:width="3dp"
|
||||||
|
android:color="@color/Primary_Light" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</selector>
|
12
app/src/main/res/drawable/bg_input_box.xml
Normal file
12
app/src/main/res/drawable/bg_input_box.xml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<item>
|
||||||
|
<shape android:shape="rectangle">
|
||||||
|
<corners android:radius="5dp" />
|
||||||
|
<solid android:color="@android:color/white" />
|
||||||
|
<stroke
|
||||||
|
android:width="1dp"
|
||||||
|
android:color="@color/Primary_Dark" />
|
||||||
|
</shape>
|
||||||
|
</item>
|
||||||
|
</selector>
|
Binary file not shown.
Before Width: | Height: | Size: 8.8 KiB |
Binary file not shown.
Before Width: | Height: | Size: 3.2 KiB |
9
app/src/main/res/drawable/ic_home.xml
Normal file
9
app/src/main/res/drawable/ic_home.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="25dp"
|
||||||
|
android:height="25dp"
|
||||||
|
android:viewportWidth="25"
|
||||||
|
android:viewportHeight="25">
|
||||||
|
<path
|
||||||
|
android:pathData="M12.5,0L0,10.714H3.125V25H9.375V17.857H15.625V25H21.875V10.607L25,10.714L12.5,0Z"
|
||||||
|
android:fillColor="#006C6C"/>
|
||||||
|
</vector>
|
5
app/src/main/res/drawable/ic_notifications.xml
Normal file
5
app/src/main/res/drawable/ic_notifications.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:pathData="M12,22c1.1,0 2,-0.9 2,-2h-4c0,1.1 0.89,2 2,2zM18,16v-5c0,-3.07 -1.64,-5.64 -4.5,-6.32L13.5,4c0,-0.83 -0.67,-1.5 -1.5,-1.5s-1.5,0.67 -1.5,1.5v0.68C7.63,5.36 6,7.92 6,11v5l-2,2v1h16v-1l-2,-2z"/>
|
||||||
|
|
||||||
|
</vector>
|
Binary file not shown.
Before Width: | Height: | Size: 4.0 KiB |
9
app/src/main/res/drawable/ic_profile.xml
Normal file
9
app/src/main/res/drawable/ic_profile.xml
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="25dp"
|
||||||
|
android:height="25dp"
|
||||||
|
android:viewportWidth="25"
|
||||||
|
android:viewportHeight="25">
|
||||||
|
<path
|
||||||
|
android:pathData="M12.5,0C9.063,0 6.25,3.5 6.25,7.813C6.25,12.125 9.063,15.625 12.5,15.625C15.938,15.625 18.75,12.125 18.75,7.813C18.75,3.5 15.938,0 12.5,0ZM5.969,15.625C2.656,15.781 0,18.5 0,21.875V25H25V21.875C25,18.5 22.375,15.781 19.031,15.625C17.344,17.531 15.031,18.75 12.5,18.75C9.969,18.75 7.656,17.531 5.969,15.625Z"
|
||||||
|
android:fillColor="#006C6C"/>
|
||||||
|
</vector>
|
@ -49,10 +49,11 @@
|
|||||||
android:id="@+id/tv_bloodsugar_level2"
|
android:id="@+id/tv_bloodsugar_level2"
|
||||||
android:layout_width="80dp"
|
android:layout_width="80dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textColor="@color/Accent_Light_Red"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
|
android:textColor="@color/Accent_Light_Red"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/tv_bloodsugar_level1"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="0.02"
|
app:layout_constraintHorizontal_bias="0.02"
|
||||||
app:layout_constraintStart_toEndOf="@id/tv_bloodsugar_level1"
|
app:layout_constraintStart_toEndOf="@id/tv_bloodsugar_level1"
|
||||||
@ -64,7 +65,7 @@
|
|||||||
android:id="@+id/tv_bloodsugar_desc"
|
android:id="@+id/tv_bloodsugar_desc"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="8sp"
|
android:textSize="10sp"
|
||||||
app:layout_constraintEnd_toEndOf="@+id/tv_bloodsugar_level2"
|
app:layout_constraintEnd_toEndOf="@+id/tv_bloodsugar_level2"
|
||||||
app:layout_constraintStart_toStartOf="@+id/tv_bloodsugar_level1"
|
app:layout_constraintStart_toStartOf="@+id/tv_bloodsugar_level1"
|
||||||
app:layout_constraintTop_toBottomOf="@id/tv_bloodsugar_level1"
|
app:layout_constraintTop_toBottomOf="@id/tv_bloodsugar_level1"
|
||||||
@ -88,9 +89,11 @@
|
|||||||
android:id="@+id/tv_bloodpressure_level2"
|
android:id="@+id/tv_bloodpressure_level2"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textColor="@color/Accent_Light_Red"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
|
android:textColor="@color/Accent_Light_Red"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/tv_bloodpressure_level1"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="0.02"
|
app:layout_constraintHorizontal_bias="0.02"
|
||||||
app:layout_constraintStart_toEndOf="@id/tv_bloodpressure_level1"
|
app:layout_constraintStart_toEndOf="@id/tv_bloodpressure_level1"
|
||||||
@ -102,7 +105,7 @@
|
|||||||
android:id="@+id/tv_bloodpressure_desc"
|
android:id="@+id/tv_bloodpressure_desc"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="8sp"
|
android:textSize="10sp"
|
||||||
app:layout_constraintEnd_toEndOf="@+id/tv_bloodpressure_level2"
|
app:layout_constraintEnd_toEndOf="@+id/tv_bloodpressure_level2"
|
||||||
app:layout_constraintStart_toStartOf="@+id/tv_bloodpressure_level1"
|
app:layout_constraintStart_toStartOf="@+id/tv_bloodpressure_level1"
|
||||||
app:layout_constraintTop_toBottomOf="@id/tv_bloodpressure_level1"
|
app:layout_constraintTop_toBottomOf="@id/tv_bloodpressure_level1"
|
||||||
@ -126,9 +129,12 @@
|
|||||||
android:id="@+id/tv_BMI_level2"
|
android:id="@+id/tv_BMI_level2"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textColor="@color/Accent_Light_Red"
|
|
||||||
android:textStyle="bold"
|
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
|
android:textColor="@color/Accent_Light_Red"
|
||||||
|
android:textSize="16sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
android:maxLength="9"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/tv_BMI_level1"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="0.02"
|
app:layout_constraintHorizontal_bias="0.02"
|
||||||
app:layout_constraintStart_toEndOf="@id/tv_BMI_level1"
|
app:layout_constraintStart_toEndOf="@id/tv_BMI_level1"
|
||||||
@ -140,7 +146,7 @@
|
|||||||
android:id="@+id/tv_BMI_desc"
|
android:id="@+id/tv_BMI_desc"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textSize="8sp"
|
android:textSize="10sp"
|
||||||
app:layout_constraintEnd_toEndOf="@+id/tv_BMI_level2"
|
app:layout_constraintEnd_toEndOf="@+id/tv_BMI_level2"
|
||||||
app:layout_constraintStart_toStartOf="@+id/tv_BMI_level1"
|
app:layout_constraintStart_toStartOf="@+id/tv_BMI_level1"
|
||||||
app:layout_constraintTop_toBottomOf="@id/tv_BMI_level1"
|
app:layout_constraintTop_toBottomOf="@id/tv_BMI_level1"
|
||||||
@ -150,14 +156,14 @@
|
|||||||
android:id="@+id/tv_goals1"
|
android:id="@+id/tv_goals1"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="Recommend Goals Completed :"
|
android:layout_marginTop="8dp"
|
||||||
|
android:text="Goals Completed :"
|
||||||
android:textColor="@color/Primary_Dark"
|
android:textColor="@color/Primary_Dark"
|
||||||
android:textSize="16sp"
|
android:textSize="16sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="0.554"
|
app:layout_constraintHorizontal_bias="0.0"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="@+id/tv_BMI_level1"
|
||||||
app:layout_constraintTop_toBottomOf="@id/tv_BMI_desc" />
|
app:layout_constraintTop_toBottomOf="@id/tv_BMI_desc" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
@ -166,11 +172,13 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:textColor="@color/Accent_Light_Red"
|
android:textColor="@color/Accent_Light_Red"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginLeft="2dp"
|
||||||
|
android:textSize="16sp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/tv_goals1"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="0.02"
|
app:layout_constraintHorizontal_bias="0.0"
|
||||||
app:layout_constraintStart_toEndOf="@id/tv_goals1"
|
app:layout_constraintStart_toEndOf="@id/tv_goals1"
|
||||||
app:layout_constraintTop_toBottomOf="@id/tv_BMI_desc"
|
app:layout_constraintTop_toTopOf="@+id/tv_goals1"
|
||||||
tools:text="3" />
|
tools:text="3" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
@ -178,7 +186,7 @@
|
|||||||
android:id="@+id/tv_title_note"
|
android:id="@+id/tv_title_note"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="4dp"
|
android:layout_marginTop="5dp"
|
||||||
android:text="JOURNAL NOTES"
|
android:text="JOURNAL NOTES"
|
||||||
android:textAlignment="center"
|
android:textAlignment="center"
|
||||||
android:textColor="@color/Primary_Dark"
|
android:textColor="@color/Primary_Dark"
|
||||||
@ -189,26 +197,19 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/constraintLayout" />
|
app:layout_constraintTop_toBottomOf="@+id/constraintLayout" />
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<TextView
|
||||||
android:id="@+id/cl_journal_note"
|
android:id="@+id/tv_journal_note"
|
||||||
android:layout_width="320dp"
|
android:layout_width="320dp"
|
||||||
android:layout_height="325dp"
|
android:layout_height="325dp"
|
||||||
|
android:background="@drawable/bg_form"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
android:padding="10dp"
|
||||||
|
android:textSize="11sp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
android:padding="5dp"
|
|
||||||
android:layout_marginTop="10dp"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tv_title_note"
|
app:layout_constraintTop_toBottomOf="@+id/tv_title_note"
|
||||||
android:background="@drawable/bg_form">
|
tools:text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras vehicula quam et diam consequat, et vestibulum odio consequat. Curabitur sit amet ex auctor ex pharetra placerat a lacinia sapien. In semper nisl eu elit elementum ultrices. Ut hendrerit urna lacinia efficitur euismod. In hac habitasse platea dictumst. Phasellus id tellus sed justo scelerisque vestibulum sit amet commodo tellus. Proin commodo magna purus, non ullamcorper mi blandit sed. Curabitur scelerisque eros nisi, vitae bibendum quam malesuada et. Suspendisse potenti. Vestibulum eu dui a odio posuere laoreet sed ut lectus. Vivamus ultrices sem sit amet enim dictum rhoncus. Nullam pharetra, purus sed bibendum volutpat, diam nibh blandit nunc, ut gravida velit sem eget eros. Maecenas in arcu accumsan, maximus enim id, ullamcorper metus. Morbi blandit nisi non justo hendrerit, in semper velit feugiat. Vestibulum vestibulum nisl sit amet facilisis ullamcorper." />
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:id="@+id/tv_journal_note"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
tools:text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras vehicula quam et diam consequat, et vestibulum odio consequat. Curabitur sit amet ex auctor ex pharetra placerat a lacinia sapien. In semper nisl eu elit elementum ultrices. Ut hendrerit urna lacinia efficitur euismod. In hac habitasse platea dictumst. Phasellus id tellus sed justo scelerisque vestibulum sit amet commodo tellus. Proin commodo magna purus, non ullamcorper mi blandit sed. Curabitur scelerisque eros nisi, vitae bibendum quam malesuada et. Suspendisse potenti. Vestibulum eu dui a odio posuere laoreet sed ut lectus. Vivamus ultrices sem sit amet enim dictum rhoncus. Nullam pharetra, purus sed bibendum volutpat, diam nibh blandit nunc, ut gravida velit sem eget eros. Maecenas in arcu accumsan, maximus enim id, ullamcorper metus. Morbi blandit nisi non justo hendrerit, in semper velit feugiat. Vestibulum vestibulum nisl sit amet facilisis ullamcorper."
|
|
||||||
android:textSize="10sp"
|
|
||||||
tools:layout_editor_absoluteX="0dp"
|
|
||||||
tools:layout_editor_absoluteY="0dp" />
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
android:id="@+id/btn_delete_history"
|
android:id="@+id/btn_delete_history"
|
||||||
android:layout_width="320dp"
|
android:layout_width="320dp"
|
||||||
@ -224,6 +225,6 @@
|
|||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/cl_journal_note" />
|
app:layout_constraintTop_toBottomOf="@+id/tv_journal_note" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
android:id="@+id/main"
|
android:id="@+id/main"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:background="@color/Secondary_Light"
|
android:background="@drawable/bg_login"
|
||||||
tools:context=".ui.journal.input.JournalInputActivity">
|
tools:context=".ui.journal.input.JournalInputActivity">
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
@ -24,44 +24,31 @@
|
|||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="16dp"
|
android:layout_marginTop="16dp"
|
||||||
android:text="Please input your today data"
|
android:text="Please input your today data"
|
||||||
|
android:textStyle="bold"
|
||||||
android:textColor="@color/Primary_Dark"
|
android:textColor="@color/Primary_Dark"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<de.hdodenhof.circleimageview.CircleImageView
|
|
||||||
android:id="@+id/iv_user"
|
|
||||||
android:layout_width="60dp"
|
|
||||||
android:layout_height="60dp"
|
|
||||||
android:layout_gravity="center_horizontal"
|
|
||||||
android:layout_marginTop="20dp"
|
|
||||||
android:src="@drawable/profile_dummy_img"
|
|
||||||
app:civ_border_color="@color/Primary_Dark"
|
|
||||||
app:civ_border_width="2dp"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tv_title_journal" />
|
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/cl_input_blood_pressure_SYS"
|
android:id="@+id/cl_input_blood_pressure_SYS"
|
||||||
android:layout_width="80dp"
|
android:layout_width="80dp"
|
||||||
android:layout_height="80dp"
|
android:layout_height="80dp"
|
||||||
android:padding="5dp"
|
|
||||||
android:background="@drawable/bg_input"
|
android:background="@drawable/bg_input"
|
||||||
|
android:padding="5dp"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/iv_user"
|
app:layout_constraintHorizontal_bias="0.0"
|
||||||
app:layout_constraintHorizontal_bias="1.0"
|
app:layout_constraintStart_toStartOf="@+id/cl_input_note"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintTop_toBottomOf="@+id/tv_title_journal"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/iv_user"
|
app:layout_constraintVertical_bias="0.03">
|
||||||
app:layout_constraintVertical_bias="0.02">
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_input_blood_pressure_SYS"
|
android:id="@+id/tv_input_blood_pressure_SYS"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:fontFamily="@font/poppins_regular"
|
android:fontFamily="@font/poppins_regular"
|
||||||
android:text="Blood Pressure\n(SYS)"
|
android:text="Blood Pressure\n(SYS) (mm/HG)"
|
||||||
android:textAlignment="center"
|
android:textAlignment="center"
|
||||||
android:textColor="@color/Primary_Dark"
|
android:textColor="@color/Primary_Dark"
|
||||||
android:textSize="8sp"
|
android:textSize="8sp"
|
||||||
@ -70,44 +57,39 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<EditText
|
||||||
android:id="@+id/tl_input_blood_pressure_SYS"
|
android:id="@+id/edt_input_blood_pressure_SYS"
|
||||||
android:layout_width="60dp"
|
android:layout_width="60dp"
|
||||||
android:layout_height="25dp"
|
android:layout_height="24dp"
|
||||||
|
android:background="@drawable/bg_input_box"
|
||||||
|
android:inputType="number"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="12sp"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="@+id/tv_input_blood_pressure_SYS"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="@+id/tv_input_blood_pressure_SYS"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tv_input_blood_pressure_SYS">
|
app:layout_constraintTop_toBottomOf="@id/tv_input_blood_pressure_SYS" />
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/edt_input_blood_pressure_SYS"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@color/white"
|
|
||||||
android:inputType="number" />
|
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/cl_input_blood_pressure_DIA"
|
android:id="@+id/cl_input_blood_pressure_DIA"
|
||||||
android:layout_width="80dp"
|
android:layout_width="80dp"
|
||||||
android:layout_height="80dp"
|
android:layout_height="80dp"
|
||||||
android:padding="5dp"
|
|
||||||
android:background="@drawable/bg_input"
|
android:background="@drawable/bg_input"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
android:padding="5dp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintBottom_toBottomOf="@+id/cl_input_blood_pressure_SYS"
|
||||||
app:layout_constraintHorizontal_bias="0.6"
|
app:layout_constraintEnd_toEndOf="@+id/cl_input_note"
|
||||||
|
app:layout_constraintHorizontal_bias="0.906"
|
||||||
app:layout_constraintStart_toEndOf="@+id/cl_input_blood_pressure_SYS"
|
app:layout_constraintStart_toEndOf="@+id/cl_input_blood_pressure_SYS"
|
||||||
app:layout_constraintTop_toBottomOf="@id/iv_user"
|
app:layout_constraintTop_toTopOf="@+id/cl_input_blood_pressure_SYS">
|
||||||
app:layout_constraintVertical_bias="0.019">
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_input_blood_pressure_DIA"
|
android:id="@+id/tv_input_blood_pressure_DIA"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:fontFamily="@font/poppins_regular"
|
android:fontFamily="@font/poppins_regular"
|
||||||
android:text="Blood Pressure\n(DIA)"
|
android:text="Blood Pressure\n(DIA) (mm/HG)"
|
||||||
android:textAlignment="center"
|
android:textAlignment="center"
|
||||||
android:textColor="@color/Primary_Dark"
|
android:textColor="@color/Primary_Dark"
|
||||||
android:textSize="8sp"
|
android:textSize="8sp"
|
||||||
@ -116,46 +98,39 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<EditText
|
||||||
android:id="@+id/tl_input_blood_pressure_DIA"
|
android:id="@+id/edt_input_blood_pressure_DIA"
|
||||||
android:layout_width="60dp"
|
android:layout_width="60dp"
|
||||||
android:layout_height="25dp"
|
android:layout_height="24dp"
|
||||||
android:layout_marginHorizontal="24dp"
|
android:background="@drawable/bg_input_box"
|
||||||
|
android:inputType="number"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="12sp"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="@+id/tv_input_blood_pressure_DIA"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="@+id/tv_input_blood_pressure_DIA"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tv_input_blood_pressure_DIA">
|
app:layout_constraintTop_toBottomOf="@+id/tv_input_blood_pressure_DIA" />
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/edt_input_blood_pressure_DIA"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@color/white"
|
|
||||||
android:inputType="number" />
|
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/cl_input_blood_sugar"
|
android:id="@+id/cl_input_blood_sugar"
|
||||||
android:layout_width="80dp"
|
android:layout_width="80dp"
|
||||||
android:layout_height="80dp"
|
android:layout_height="80dp"
|
||||||
android:padding="5dp"
|
|
||||||
android:background="@drawable/bg_input"
|
android:background="@drawable/bg_input"
|
||||||
|
android:padding="5dp"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="@+id/cl_input_blood_pressure_SYS"
|
||||||
app:layout_constraintEnd_toStartOf="@+id/iv_user"
|
|
||||||
app:layout_constraintHorizontal_bias="1.0"
|
app:layout_constraintHorizontal_bias="1.0"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="@+id/cl_input_note"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/cl_input_blood_pressure_SYS"
|
app:layout_constraintTop_toBottomOf="@+id/cl_input_blood_pressure_SYS"
|
||||||
app:layout_constraintVertical_bias="0.05">
|
app:layout_constraintVertical_bias="0.05">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_input_blood_sugar"
|
android:id="@+id/tv_input_blood_sugar"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:fontFamily="@font/poppins_regular"
|
android:fontFamily="@font/poppins_regular"
|
||||||
android:text="Blood Sugar \nLevel"
|
android:text="Blood Sugar \nLevel (mg/dL)"
|
||||||
android:textAlignment="center"
|
android:textAlignment="center"
|
||||||
android:textColor="@color/Primary_Dark"
|
android:textColor="@color/Primary_Dark"
|
||||||
android:textSize="8sp"
|
android:textSize="8sp"
|
||||||
@ -164,44 +139,39 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<EditText
|
||||||
android:id="@+id/tl_input_blood_sugar"
|
android:id="@+id/edt_input_blood_sugar"
|
||||||
android:layout_width="60dp"
|
android:layout_width="60dp"
|
||||||
android:layout_height="25dp"
|
android:layout_height="24dp"
|
||||||
|
android:background="@drawable/bg_input_box"
|
||||||
|
android:inputType="number"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="12sp"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="@+id/tv_input_blood_sugar"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="@+id/tv_input_blood_sugar"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tv_input_blood_sugar">
|
app:layout_constraintTop_toBottomOf="@+id/tv_input_blood_sugar" />
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/edt_input_blood_sugar"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@color/white"
|
|
||||||
android:inputType="number" />
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/cl_input_weight"
|
android:id="@+id/cl_input_weight"
|
||||||
android:layout_width="80dp"
|
android:layout_width="80dp"
|
||||||
android:layout_height="80dp"
|
android:layout_height="80dp"
|
||||||
android:padding="5dp"
|
|
||||||
android:background="@drawable/bg_input"
|
android:background="@drawable/bg_input"
|
||||||
|
android:padding="5dp"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="@+id/cl_input_note"
|
||||||
app:layout_constraintHorizontal_bias="0.6"
|
app:layout_constraintHorizontal_bias="0.914"
|
||||||
app:layout_constraintStart_toEndOf="@+id/cl_input_blood_pressure_SYS"
|
app:layout_constraintStart_toEndOf="@+id/cl_input_blood_pressure_SYS"
|
||||||
app:layout_constraintTop_toBottomOf="@id/cl_input_blood_pressure_DIA"
|
app:layout_constraintTop_toBottomOf="@id/cl_input_blood_pressure_DIA"
|
||||||
app:layout_constraintVertical_bias="0.05">
|
app:layout_constraintVertical_bias="0.048">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_input_weight"
|
android:id="@+id/tv_input_weight"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="8dp"
|
|
||||||
android:fontFamily="@font/poppins_regular"
|
android:fontFamily="@font/poppins_regular"
|
||||||
android:text="Weight"
|
android:text="Weight\n(kg)"
|
||||||
android:textAlignment="center"
|
android:textAlignment="center"
|
||||||
android:textColor="@color/Primary_Dark"
|
android:textColor="@color/Primary_Dark"
|
||||||
android:textSize="8sp"
|
android:textSize="8sp"
|
||||||
@ -210,50 +180,48 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<EditText
|
||||||
android:id="@+id/tl_input_weight"
|
android:id="@+id/edt_input_weight"
|
||||||
android:layout_width="60dp"
|
android:layout_width="60dp"
|
||||||
android:layout_height="25dp"
|
android:layout_height="24dp"
|
||||||
android:layout_marginTop="4dp"
|
android:background="@drawable/bg_input_box"
|
||||||
|
android:inputType="number"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="12sp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="@+id/tv_input_weight"
|
||||||
|
app:layout_constraintStart_toStartOf="@+id/tv_input_weight"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/tv_input_weight" />
|
||||||
|
|
||||||
|
<EditText
|
||||||
|
android:id="@+id/edt_gender"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:layout_height="20dp"
|
||||||
|
android:background="@color/white"
|
||||||
|
android:visibility="gone"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tv_input_weight">
|
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/edt_input_weight"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@color/white"
|
|
||||||
android:inputType="number" />
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/edt_gender"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="20dp"
|
|
||||||
android:visibility="gone"
|
|
||||||
android:background="@color/white"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/edt_age"
|
android:id="@+id/edt_age"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="20dp"
|
android:layout_height="20dp"
|
||||||
android:visibility="gone"
|
android:background="@color/white"
|
||||||
android:background="@color/white"
|
android:visibility="gone"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/edt_height"
|
android:id="@+id/edt_height"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="20dp"
|
android:layout_height="20dp"
|
||||||
android:visibility="gone"
|
android:background="@color/white"
|
||||||
android:background="@color/white"
|
android:visibility="gone"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
@ -282,23 +250,21 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<EditText
|
||||||
android:id="@+id/tl_input_note"
|
android:id="@+id/edt_input_note"
|
||||||
android:layout_width="200dp"
|
android:layout_width="200dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="155dp"
|
||||||
android:layout_marginTop="4dp"
|
android:background="@drawable/bg_input_box"
|
||||||
|
android:gravity="start|top"
|
||||||
|
android:imeOptions="actionDone"
|
||||||
|
android:inputType="textMultiLine|textCapSentences"
|
||||||
|
android:maxLines="10"
|
||||||
|
android:minLines="4"
|
||||||
|
android:overScrollMode="always"
|
||||||
|
android:scrollbars="vertical"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tv_input_note">
|
app:layout_constraintTop_toBottomOf="@+id/tv_input_note" />
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/edt_input_note"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:inputType="text"
|
|
||||||
android:background="@color/white" />
|
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
@ -315,6 +281,5 @@
|
|||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent" />
|
app:layout_constraintStart_toStartOf="parent" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -12,7 +12,7 @@
|
|||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:padding="20dp"
|
android:padding="20dp"
|
||||||
android:background="@color/Accent_Dark_Gray"
|
android:background="@drawable/bg_dashboard"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
@ -25,7 +25,7 @@
|
|||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent">
|
app:layout_constraintTop_toTopOf="parent">
|
||||||
|
z
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_title"
|
android:id="@+id/tv_title"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
@ -53,46 +53,143 @@
|
|||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/tv_title" />
|
app:layout_constraintTop_toBottomOf="@id/tv_title" />
|
||||||
|
<!--Health Guide CL-->
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/cl_guide_1"
|
||||||
|
android:layout_width="270dp"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
app:layout_constraintStart_toStartOf="@id/tv_sub_title"
|
||||||
|
app:layout_constraintEnd_toEndOf="@id/tv_sub_title"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tv_sub_title"
|
||||||
|
android:background="@drawable/bg_form">
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_logo"
|
||||||
|
android:layout_width="30dp"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:layout_margin="10dp"
|
||||||
|
android:background="@drawable/cuboid"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"/>
|
||||||
|
|
||||||
<ImageView
|
<TextView
|
||||||
android:id="@+id/iv_instruction_1"
|
android:id="@+id/tv_guide"
|
||||||
android:layout_width="203dp"
|
android:layout_width="210dp"
|
||||||
android:layout_height="30dp"
|
android:layout_height="40dp"
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginLeft="5dp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
android:text="Tetap tenang dan hindari emosi yang kuat atau stres selama setidaknya 30 menit sebelum pemeriksaan."
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
android:textColor="@color/Accent_Light_Orange"
|
||||||
android:background="@drawable/frame_1"
|
android:textSize="10sp"
|
||||||
app:layout_constraintTop_toBottomOf="@id/tv_sub_title" />
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/iv_logo"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.2"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/iv_logo"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/iv_logo" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/cl_guide_2"
|
||||||
|
android:layout_width="270dp"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
app:layout_constraintStart_toStartOf="@id/cl_guide_1"
|
||||||
|
app:layout_constraintEnd_toEndOf="@id/cl_guide_1"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/cl_guide_1"
|
||||||
|
android:background="@drawable/bg_form">
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_logo_2"
|
||||||
|
android:layout_width="30dp"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:layout_margin="10dp"
|
||||||
|
android:background="@drawable/cuboid"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"/>
|
||||||
|
|
||||||
<ImageView
|
<TextView
|
||||||
android:id="@+id/iv_instruction_2"
|
android:id="@+id/tv_guide_2"
|
||||||
android:layout_width="203dp"
|
android:layout_width="210dp"
|
||||||
android:layout_height="30dp"
|
android:layout_height="40dp"
|
||||||
android:layout_marginTop="2dp"
|
android:layout_marginLeft="5dp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
android:text="Berpuasa (hanya minum air putih) selama 8-10 jam sebelum melakukan pemeriksaan."
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
android:textColor="@color/Accent_Light_Orange"
|
||||||
android:background="@drawable/frame_2"
|
android:textSize="10sp"
|
||||||
app:layout_constraintTop_toBottomOf="@id/iv_instruction_1"/>
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/iv_logo_2"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.2"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/iv_logo_2"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/iv_logo_2" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/cl_guide_3"
|
||||||
|
android:layout_width="270dp"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
app:layout_constraintStart_toStartOf="@id/cl_guide_2"
|
||||||
|
app:layout_constraintEnd_toEndOf="@id/cl_guide_2"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/cl_guide_2"
|
||||||
|
android:background="@drawable/bg_form">
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_logo_3"
|
||||||
|
android:layout_width="30dp"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:layout_margin="10dp"
|
||||||
|
android:background="@drawable/cuboid"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"/>
|
||||||
|
|
||||||
<ImageView
|
<TextView
|
||||||
android:id="@+id/iv_instruction_3"
|
android:id="@+id/tv_guide_3"
|
||||||
android:layout_width="203dp"
|
android:layout_width="210dp"
|
||||||
android:layout_height="30dp"
|
android:layout_height="40dp"
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginLeft="5dp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
android:text="Hindarkan minum kopi atau minuman berkafein lainnya sebelum pemeriksaan."
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
android:textColor="@color/Accent_Light_Orange"
|
||||||
android:background="@drawable/frame_3"
|
android:textSize="10sp"
|
||||||
app:layout_constraintTop_toBottomOf="@id/iv_instruction_2"/>
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/iv_logo_3"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.2"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/iv_logo_3"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/iv_logo_3" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
|
android:id="@+id/cl_guide_4"
|
||||||
|
android:layout_width="270dp"
|
||||||
|
android:layout_height="50dp"
|
||||||
|
android:layout_marginTop="5dp"
|
||||||
|
app:layout_constraintStart_toStartOf="@id/cl_guide_3"
|
||||||
|
app:layout_constraintEnd_toEndOf="@id/cl_guide_3"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/cl_guide_3"
|
||||||
|
android:background="@drawable/bg_form">
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_logo_4"
|
||||||
|
android:layout_width="30dp"
|
||||||
|
android:layout_height="30dp"
|
||||||
|
android:layout_margin="10dp"
|
||||||
|
android:background="@drawable/cuboid"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"/>
|
||||||
|
|
||||||
<ImageView
|
<TextView
|
||||||
android:id="@+id/iv_instruction_4"
|
android:id="@+id/tv_guide_4"
|
||||||
android:layout_width="203dp"
|
android:layout_width="210dp"
|
||||||
android:layout_height="30dp"
|
android:layout_height="40dp"
|
||||||
android:layout_marginTop="5dp"
|
android:layout_marginLeft="5dp"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
android:text="Lakukan pemeriksaan secara rutin minimal dua kali seminggu."
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
android:textColor="@color/Accent_Light_Orange"
|
||||||
android:background="@drawable/frame_4"
|
android:textSize="10sp"
|
||||||
app:layout_constraintTop_toBottomOf="@id/iv_instruction_3"/>
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@id/iv_logo_4"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintHorizontal_bias="0.2"
|
||||||
|
app:layout_constraintStart_toEndOf="@id/iv_logo_4"
|
||||||
|
app:layout_constraintTop_toTopOf="@id/iv_logo_4" />
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
@ -253,8 +350,8 @@
|
|||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="0.0"
|
app:layout_constraintHorizontal_bias="0.0"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toBottomOf="@id/cl_Daily_Report_1"
|
||||||
app:layout_constraintVertical_bias="0.700" />
|
app:layout_constraintVertical_bias="0.0" />
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/fl_daily_counter"
|
android:id="@+id/fl_daily_counter"
|
||||||
@ -390,16 +487,28 @@
|
|||||||
tools:listitem="@layout/item_health_history"
|
tools:listitem="@layout/item_health_history"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/cl_Health_Report" />
|
app:layout_constraintTop_toBottomOf="@+id/cl_Health_Report" />
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/iv_add"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_marginBottom="8dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
android:translationZ="10dp"
|
||||||
|
app:srcCompat="@drawable/ic_input_button"/>
|
||||||
|
|
||||||
<com.google.android.material.bottomnavigation.BottomNavigationView
|
<com.google.android.material.bottomnavigation.BottomNavigationView
|
||||||
android:id="@+id/bottom_navigation"
|
android:id="@+id/nav_view"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="16dp"
|
android:background="@color/Primary_Dark"
|
||||||
android:background="@color/Primary_Light"
|
app:itemIconSize="40dp"
|
||||||
app:itemIconTint="@color/white"
|
app:itemIconTint="@color/white"
|
||||||
app:itemTextColor="@color/white"
|
app:labelVisibilityMode="unlabeled"
|
||||||
app:menu="@menu/bottom_nav_menu"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"/>
|
app:menu="@menu/bottom_nav_menu" />
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
@ -85,7 +85,7 @@
|
|||||||
android:layout_marginStart="32dp"
|
android:layout_marginStart="32dp"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginTop="10dp"
|
||||||
android:fontFamily="@font/poppins_regular"
|
android:fontFamily="@font/poppins_regular"
|
||||||
android:text="Name"
|
android:text="Nama"
|
||||||
android:textColor="@color/Primary_Dark"
|
android:textColor="@color/Primary_Dark"
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
@ -102,49 +102,50 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/tv_name">
|
app:layout_constraintTop_toBottomOf="@id/tv_name">
|
||||||
|
|
||||||
<com.healthjournal.ui.custom.CustomEditText
|
<EditText
|
||||||
android:id="@+id/edt_name"
|
android:id="@+id/edt_name"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@color/white"
|
android:background="@drawable/bg_input_box"
|
||||||
android:ems="10"
|
android:ems="10"
|
||||||
android:inputType="textEmailAddress"
|
android:inputType="textEmailAddress"
|
||||||
tools:ignore="SpeakableTextPresentCheck" />
|
tools:ignore="SpeakableTextPresentCheck" />
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
<!--
|
||||||
|
<TextView
|
||||||
|
android:id="@+id/tv_email"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="16dp"
|
||||||
|
android:layout_marginStart="32dp"
|
||||||
|
android:layout_marginTop="10dp"
|
||||||
|
android:fontFamily="@font/poppins_regular"
|
||||||
|
android:text="Email"
|
||||||
|
android:textColor="@color/Primary_Dark"
|
||||||
|
android:textSize="12sp"
|
||||||
|
android:textStyle="bold"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@id/tl_name" />
|
||||||
|
|
||||||
<TextView
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/tv_email"
|
android:id="@+id/tl_email"
|
||||||
android:layout_width="wrap_content"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
android:layout_height="16dp"
|
android:layout_width="0dp"
|
||||||
android:layout_marginStart="32dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginTop="10dp"
|
android:layout_marginHorizontal="32dp"
|
||||||
android:fontFamily="@font/poppins_regular"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
android:text="Email"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
android:textColor="@color/Primary_Dark"
|
app:layout_constraintTop_toBottomOf="@id/tv_email">
|
||||||
android:textSize="12sp"
|
|
||||||
android:textStyle="bold"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@id/tl_name" />
|
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<EditText
|
||||||
android:id="@+id/tl_email"
|
android:id="@+id/edt_email"
|
||||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
android:layout_width="match_parent"
|
||||||
android:layout_width="0dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:background="@drawable/bg_input_box"
|
||||||
android:layout_marginHorizontal="32dp"
|
android:ems="10"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
android:inputType="textEmailAddress"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
tools:ignore="SpeakableTextPresentCheck" />
|
||||||
app:layout_constraintTop_toBottomOf="@id/tv_email">
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
-->
|
||||||
<com.healthjournal.ui.custom.CustomEditText
|
|
||||||
android:id="@+id/edt_email"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@color/white"
|
|
||||||
android:ems="10"
|
|
||||||
android:inputType="textEmailAddress"
|
|
||||||
tools:ignore="SpeakableTextPresentCheck" />
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_date"
|
android:id="@+id/tv_date"
|
||||||
@ -153,123 +154,129 @@
|
|||||||
android:layout_marginStart="32dp"
|
android:layout_marginStart="32dp"
|
||||||
android:layout_marginTop="8dp"
|
android:layout_marginTop="8dp"
|
||||||
android:fontFamily="@font/poppins_regular"
|
android:fontFamily="@font/poppins_regular"
|
||||||
android:text="Date Of Birth"
|
android:text="Tanggal Lahir"
|
||||||
android:textColor="@color/Primary_Dark"
|
android:textColor="@color/Primary_Dark"
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tl_email" />
|
app:layout_constraintTop_toBottomOf="@+id/tl_name" />
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/tl_dates"
|
android:id="@+id/tl_date_of_birth"
|
||||||
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
android:layout_width="0dp"
|
android:layout_width="0dp"
|
||||||
android:layout_height="30dp"
|
android:layout_height="wrap_content"
|
||||||
android:layout_marginHorizontal="32dp"
|
android:layout_marginHorizontal="32dp"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
android:layout_marginTop="5dp"
|
||||||
|
android:hint="Tanggal Lahir"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tl_email"
|
app:layout_constraintTop_toBottomOf="@+id/tv_date">
|
||||||
app:layout_constraintVertical_bias="0.119">
|
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/edt_dates"
|
android:id="@+id/edt_date"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="20dp"
|
android:layout_height="wrap_content"
|
||||||
android:background="@color/white" />
|
android:inputType="none"
|
||||||
|
android:focusable="false"
|
||||||
|
android:clickable="true"
|
||||||
|
android:background="@drawable/bg_input_box"
|
||||||
|
android:textColor="@color/black" />
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/cl_input_height"
|
android:id="@+id/cl_input_height"
|
||||||
android:layout_width="80dp"
|
android:layout_width="90dp"
|
||||||
android:layout_height="80dp"
|
android:layout_height="90dp"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
android:background="@drawable/bg_input"
|
android:background="@drawable/bg_input"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
android:padding="5dp"
|
||||||
|
app:layout_constraintBottom_toBottomOf="@+id/cl_input_weight"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="0.096"
|
app:layout_constraintHorizontal_bias="0.137"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tl_dates"
|
app:layout_constraintTop_toTopOf="@+id/cl_input_weight">
|
||||||
app:layout_constraintVertical_bias="0.226">
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_input_height"
|
android:id="@+id/tv_input_height"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:fontFamily="@font/poppins_regular"
|
android:fontFamily="@font/poppins_regular"
|
||||||
android:text="HEIGHT"
|
android:text="Tinggi Badan\n(CM)"
|
||||||
android:textAlignment="center"
|
android:textAlignment="center"
|
||||||
android:textColor="@color/Primary_Dark"
|
android:textColor="@color/Primary_Dark"
|
||||||
android:textSize="8sp"
|
android:textSize="10sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<EditText
|
||||||
android:id="@+id/tl_input_height"
|
android:id="@+id/edt_input_height"
|
||||||
android:layout_width="60dp"
|
android:layout_width="65dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="25dp"
|
||||||
|
android:layout_marginTop="8dp"
|
||||||
|
android:background="@drawable/bg_input_box"
|
||||||
|
android:inputType="number"
|
||||||
|
android:textColor="@color/black"
|
||||||
|
android:textSize="12sp"
|
||||||
|
android:padding="2dp"
|
||||||
|
android:textAlignment="center"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tv_input_height">
|
app:layout_constraintTop_toBottomOf="@+id/tv_input_height" />
|
||||||
|
|
||||||
<EditText
|
|
||||||
android:id="@+id/edt_input_height"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="20dp"
|
|
||||||
android:background="@color/white" />
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/cl_input_weight"
|
android:id="@+id/cl_input_weight"
|
||||||
android:layout_width="80dp"
|
android:layout_width="90dp"
|
||||||
android:layout_height="80dp"
|
android:layout_height="90dp"
|
||||||
|
android:layout_marginEnd="16dp"
|
||||||
android:background="@drawable/bg_input"
|
android:background="@drawable/bg_input"
|
||||||
|
android:padding="5dp"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="0.828"
|
app:layout_constraintHorizontal_bias="0.853"
|
||||||
app:layout_constraintStart_toEndOf="@+id/cl_input_height"
|
app:layout_constraintStart_toEndOf="@+id/cl_input_height"
|
||||||
app:layout_constraintTop_toTopOf="@id/cl_input_height"
|
app:layout_constraintTop_toBottomOf="@+id/tl_date_of_birth"
|
||||||
app:layout_constraintVertical_bias="0.0">
|
app:layout_constraintVertical_bias="0.167">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_input_weight"
|
android:id="@+id/tv_input_weight"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:fontFamily="@font/poppins_regular"
|
android:fontFamily="@font/poppins_regular"
|
||||||
android:text="WEIGHT"
|
android:text="Berat Badan\n(kg)"
|
||||||
android:textAlignment="center"
|
android:textAlignment="center"
|
||||||
android:textColor="@color/Primary_Dark"
|
android:textColor="@color/Primary_Dark"
|
||||||
android:textSize="8sp"
|
android:textSize="10sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<EditText
|
||||||
android:id="@+id/tl_input_weight"
|
android:id="@+id/edt_input_weight"
|
||||||
android:layout_width="60dp"
|
android:layout_width="65dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="24dp"
|
||||||
android:layout_marginHorizontal="24dp"
|
android:layout_marginTop="12dp"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
android:background="@drawable/bg_input_box"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
android:inputType="number"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
android:padding="2dp"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tv_input_weight">
|
android:textAlignment="center"
|
||||||
|
android:textColor="@color/black"
|
||||||
<EditText
|
android:textSize="12sp"
|
||||||
android:id="@+id/edt_input_weight"
|
app:layout_constraintEnd_toEndOf="@+id/tv_input_weight"
|
||||||
android:layout_width="match_parent"
|
app:layout_constraintHorizontal_bias="0.0"
|
||||||
android:layout_height="20dp"
|
app:layout_constraintStart_toStartOf="@+id/tv_input_weight"
|
||||||
android:background="@color/white" />
|
app:layout_constraintTop_toBottomOf="@+id/tv_input_weight" />
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
android:id="@+id/btn_update_data"
|
android:id="@+id/btn_update_data"
|
||||||
android:layout_width="254dp"
|
android:layout_width="254dp"
|
||||||
android:layout_height="39dp"
|
android:layout_height="39dp"
|
||||||
android:layout_marginTop="24dp"
|
android:layout_marginTop="20dp"
|
||||||
android:background="@drawable/bg_button"
|
android:background="@drawable/bg_button"
|
||||||
android:text="Input Data"
|
android:text="Input Data"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
@ -279,7 +286,7 @@
|
|||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="0.496"
|
app:layout_constraintHorizontal_bias="0.496"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/cl_input_height" />
|
app:layout_constraintTop_toBottomOf="@+id/cl_input_weight" />
|
||||||
|
|
||||||
<com.google.android.material.button.MaterialButton
|
<com.google.android.material.button.MaterialButton
|
||||||
android:id="@+id/btn_logout"
|
android:id="@+id/btn_logout"
|
||||||
|
@ -170,7 +170,7 @@
|
|||||||
android:layout_height="39dp"
|
android:layout_height="39dp"
|
||||||
android:layout_marginTop="40dp"
|
android:layout_marginTop="40dp"
|
||||||
android:background="@drawable/bg_button"
|
android:background="@drawable/bg_button"
|
||||||
android:text="Login"
|
android:text="REGISTER"
|
||||||
android:textAllCaps="false"
|
android:textAllCaps="false"
|
||||||
android:textColor="@color/white"
|
android:textColor="@color/white"
|
||||||
android:textSize="14sp"
|
android:textSize="14sp"
|
||||||
|
@ -88,10 +88,10 @@
|
|||||||
app:layout_constraintTop_toBottomOf="@id/iv_user" />
|
app:layout_constraintTop_toBottomOf="@id/iv_user" />
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/cl_input_blood_pressure_SYS"
|
android:id="@+id/cl_input_weight"
|
||||||
android:layout_width="100dp"
|
android:layout_width="100dp"
|
||||||
android:layout_height="100dp"
|
android:layout_height="100dp"
|
||||||
android:padding="10dp"
|
android:padding="5dp"
|
||||||
android:background="@drawable/bg_input"
|
android:background="@drawable/bg_input"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
@ -106,7 +106,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:fontFamily="@font/poppins_regular"
|
android:fontFamily="@font/poppins_regular"
|
||||||
android:text="Berat\nBadan"
|
android:text="Berat Badan \n(KG)"
|
||||||
android:textAlignment="center"
|
android:textAlignment="center"
|
||||||
android:textColor="@color/Primary_Dark"
|
android:textColor="@color/Primary_Dark"
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
@ -115,35 +115,31 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
|
||||||
android:id="@+id/tl_input_weight"
|
|
||||||
android:layout_width="60dp"
|
|
||||||
android:layout_height="40dp"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tv_input_weight">
|
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/edt_input_weight"
|
android:id="@+id/edt_input_weight"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="60dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="30dp"
|
||||||
android:background="@color/white"
|
android:background="@drawable/bg_input_box"
|
||||||
android:textColor="@color/black" />
|
android:textColor="@color/black"
|
||||||
|
android:textAlignment="center"
|
||||||
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/tv_input_weight"
|
||||||
|
android:inputType="number"/>
|
||||||
|
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
<androidx.constraintlayout.widget.ConstraintLayout
|
<androidx.constraintlayout.widget.ConstraintLayout
|
||||||
android:id="@+id/cl_input_blood_pressure_DIA"
|
android:id="@+id/cl_input_height"
|
||||||
android:layout_width="100dp"
|
android:layout_width="100dp"
|
||||||
android:padding="10dp"
|
android:padding="5dp"
|
||||||
android:layout_height="100dp"
|
android:layout_height="100dp"
|
||||||
android:background="@drawable/bg_input"
|
android:background="@drawable/bg_input"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="0.687"
|
app:layout_constraintHorizontal_bias="0.687"
|
||||||
app:layout_constraintStart_toEndOf="@+id/cl_input_blood_pressure_SYS"
|
app:layout_constraintStart_toEndOf="@+id/cl_input_weight"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tv_email"
|
app:layout_constraintTop_toBottomOf="@+id/tv_email"
|
||||||
app:layout_constraintVertical_bias="0.021">
|
app:layout_constraintVertical_bias="0.021">
|
||||||
|
|
||||||
@ -152,7 +148,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:fontFamily="@font/poppins_regular"
|
android:fontFamily="@font/poppins_regular"
|
||||||
android:text="Tinggi\nBadan"
|
android:text="Tinggi Badan\n(CM)"
|
||||||
android:textAlignment="center"
|
android:textAlignment="center"
|
||||||
android:textColor="@color/Primary_Dark"
|
android:textColor="@color/Primary_Dark"
|
||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
@ -161,24 +157,17 @@
|
|||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toTopOf="parent" />
|
app:layout_constraintTop_toTopOf="parent" />
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
|
||||||
android:id="@+id/tl_input_heigh"
|
|
||||||
android:layout_width="60dp"
|
|
||||||
android:layout_height="40dp"
|
|
||||||
android:layout_marginHorizontal="24dp"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tv_input_height">
|
|
||||||
|
|
||||||
<EditText
|
<EditText
|
||||||
android:id="@+id/edt_input_heigh"
|
android:id="@+id/edt_input_heigh"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="60dp"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="30dp"
|
||||||
android:background="@color/white"
|
android:background="@drawable/bg_input_box"
|
||||||
android:textColor="@color/black" />
|
android:textColor="@color/black"
|
||||||
|
android:textAlignment="center"
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
|
app:layout_constraintTop_toBottomOf="@+id/tv_input_height"/>
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_name"
|
android:id="@+id/tv_name"
|
||||||
@ -192,7 +181,7 @@
|
|||||||
android:textSize="12sp"
|
android:textSize="12sp"
|
||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@id/cl_input_blood_pressure_DIA" />
|
app:layout_constraintTop_toBottomOf="@id/cl_input_height" />
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/tl_name"
|
android:id="@+id/tl_name"
|
||||||
@ -210,6 +199,7 @@
|
|||||||
android:background="@color/white"
|
android:background="@color/white"
|
||||||
android:textColor="@color/black"
|
android:textColor="@color/black"
|
||||||
android:ems="10"
|
android:ems="10"
|
||||||
|
android:hint="Masukan Nama Panjang"
|
||||||
tools:ignore="SpeakableTextPresentCheck" />
|
tools:ignore="SpeakableTextPresentCheck" />
|
||||||
</com.google.android.material.textfield.TextInputLayout>
|
</com.google.android.material.textfield.TextInputLayout>
|
||||||
<TextView
|
<TextView
|
||||||
@ -257,6 +247,7 @@
|
|||||||
android:textStyle="bold"
|
android:textStyle="bold"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tl_gender" />
|
app:layout_constraintTop_toBottomOf="@+id/tl_gender" />
|
||||||
|
|
||||||
<com.google.android.material.textfield.TextInputLayout
|
<com.google.android.material.textfield.TextInputLayout
|
||||||
android:id="@+id/tl_date_of_birth"
|
android:id="@+id/tl_date_of_birth"
|
||||||
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
style="@style/Widget.MaterialComponents.TextInputLayout.OutlinedBox"
|
||||||
|
@ -4,8 +4,9 @@
|
|||||||
xmlns:tools="http://schemas.android.com/tools"
|
xmlns:tools="http://schemas.android.com/tools"
|
||||||
android:background="@drawable/bg_profile"
|
android:background="@drawable/bg_profile"
|
||||||
android:layout_margin="10dp"
|
android:layout_margin="10dp"
|
||||||
android:layout_width="350dp"
|
android:padding="5dp"
|
||||||
android:layout_height="120dp">
|
android:layout_width="360dp"
|
||||||
|
android:layout_height="130dp">
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_day"
|
android:id="@+id/tv_day"
|
||||||
@ -32,12 +33,12 @@
|
|||||||
app:layout_constraintHorizontal_bias="0.058"
|
app:layout_constraintHorizontal_bias="0.058"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tv_day"
|
app:layout_constraintTop_toBottomOf="@+id/tv_day"
|
||||||
app:layout_constraintVertical_bias="0.038" />
|
app:layout_constraintVertical_bias="0.0" />
|
||||||
|
|
||||||
<de.hdodenhof.circleimageview.CircleImageView
|
<de.hdodenhof.circleimageview.CircleImageView
|
||||||
android:id="@+id/iv_user"
|
android:id="@+id/iv_user"
|
||||||
android:layout_width="64dp"
|
android:layout_width="60dp"
|
||||||
android:layout_height="64dp"
|
android:layout_height="60dp"
|
||||||
android:layout_gravity="center_horizontal"
|
android:layout_gravity="center_horizontal"
|
||||||
android:layout_marginStart="20dp"
|
android:layout_marginStart="20dp"
|
||||||
android:src="@drawable/profile_dummy_img"
|
android:src="@drawable/profile_dummy_img"
|
||||||
@ -45,9 +46,10 @@
|
|||||||
app:civ_border_width="2dp"
|
app:civ_border_width="2dp"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="@+id/tv_date"
|
app:layout_constraintEnd_toEndOf="@+id/tv_date"
|
||||||
|
app:layout_constraintHorizontal_bias="0.0"
|
||||||
app:layout_constraintStart_toStartOf="parent"
|
app:layout_constraintStart_toStartOf="parent"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tv_date"
|
app:layout_constraintTop_toBottomOf="@+id/tv_date"
|
||||||
app:layout_constraintVertical_bias="0.0" />
|
app:layout_constraintVertical_bias="0.647" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
android:id="@+id/tv_sub_BSL"
|
android:id="@+id/tv_sub_BSL"
|
||||||
@ -56,7 +58,7 @@
|
|||||||
android:text="Blood Sugar Level : "
|
android:text="Blood Sugar Level : "
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="0.086"
|
app:layout_constraintHorizontal_bias="0.21"
|
||||||
app:layout_constraintStart_toEndOf="@+id/iv_user"
|
app:layout_constraintStart_toEndOf="@+id/iv_user"
|
||||||
app:layout_constraintTop_toTopOf="parent"
|
app:layout_constraintTop_toTopOf="parent"
|
||||||
app:layout_constraintVertical_bias="0.346" />
|
app:layout_constraintVertical_bias="0.346" />
|
||||||
@ -82,7 +84,7 @@
|
|||||||
android:text="Blood Pressure Level :"
|
android:text="Blood Pressure Level :"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="0.342"
|
app:layout_constraintHorizontal_bias="0.604"
|
||||||
app:layout_constraintStart_toEndOf="@+id/iv_user"
|
app:layout_constraintStart_toEndOf="@+id/iv_user"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tv_sub_BSL"
|
app:layout_constraintTop_toBottomOf="@+id/tv_sub_BSL"
|
||||||
app:layout_constraintVertical_bias="0.042" />
|
app:layout_constraintVertical_bias="0.042" />
|
||||||
@ -108,12 +110,13 @@
|
|||||||
android:text="Recommended goals completed"
|
android:text="Recommended goals completed"
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
app:layout_constraintEnd_toEndOf="parent"
|
app:layout_constraintEnd_toEndOf="parent"
|
||||||
app:layout_constraintHorizontal_bias="0.387"
|
app:layout_constraintHorizontal_bias="0.666"
|
||||||
app:layout_constraintStart_toEndOf="@+id/iv_user"
|
app:layout_constraintStart_toEndOf="@+id/iv_user"
|
||||||
app:layout_constraintTop_toBottomOf="@+id/tv_sub_BPL"
|
app:layout_constraintTop_toBottomOf="@+id/tv_sub_BPL"
|
||||||
app:layout_constraintVertical_bias="0.0" />
|
app:layout_constraintVertical_bias="0.038" />
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
android:id="@+id/tv_goals_count"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:text="[lorem ipsum]"
|
android:text="[lorem ipsum]"
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
android:title="Home"/>
|
android:title="Home"/>
|
||||||
<item
|
<item
|
||||||
android:id="@+id/nav_add"
|
android:id="@+id/nav_add"
|
||||||
android:icon="@drawable/ic_add"
|
android:icon="@drawable/ic_input_button"
|
||||||
android:title="Add"/>
|
android:title="Add"/>
|
||||||
<item
|
<item
|
||||||
android:id="@+id/nav_profile"
|
android:id="@+id/nav_profile"
|
||||||
|
@ -7,4 +7,16 @@
|
|||||||
<string name="password_length">Kolom ini tidak boleh kurang dari 8 karakter!</string>
|
<string name="password_length">Kolom ini tidak boleh kurang dari 8 karakter!</string>
|
||||||
<string name="empty_field">Kolom ini tidak boleh kosong!</string>
|
<string name="empty_field">Kolom ini tidak boleh kosong!</string>
|
||||||
<string name="required_field">This field is required!</string>
|
<string name="required_field">This field is required!</string>
|
||||||
|
|
||||||
|
// Activity Login
|
||||||
|
|
||||||
|
// Activity Register
|
||||||
|
|
||||||
|
// Activity Detail Journal
|
||||||
|
|
||||||
|
// Activity Journal Input
|
||||||
|
|
||||||
|
// Activity Recommendation
|
||||||
|
|
||||||
|
// Activity S
|
||||||
</resources>
|
</resources>
|
@ -1,9 +1,39 @@
|
|||||||
<resources xmlns:tools="http://schemas.android.com/tools">
|
<resources xmlns:tools="http://schemas.android.com/tools">
|
||||||
<!-- Base application theme. -->
|
<!-- Base application theme. -->
|
||||||
<style name="Base.Theme.HealthJournal" parent="Theme.Material3.DayNight.NoActionBar">
|
<style name="Base.Theme.HealthJournal" parent="Theme.MaterialComponents.DayNight.NoActionBar">
|
||||||
<!-- Customize your light theme here. -->
|
<item name="colorPrimary">@color/Primary_Dark</item>
|
||||||
|
<item name="colorPrimaryVariant">@color/Primary_Dark</item>
|
||||||
|
<item name="colorOnPrimary">@color/Primary_Light</item>
|
||||||
|
<item name="colorSecondary">@color/Accent_Light_Orange</item>
|
||||||
|
<item name="colorOnSecondary">@color/Primary_Dark</item>
|
||||||
|
|
||||||
<!-- <item name="colorPrimary">@color/my_light_primary</item> -->
|
<!-- <item name="colorPrimary">@color/my_light_primary</item> -->
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<style name="Theme.HealthJournal" parent="Base.Theme.HealthJournal" />
|
<style name="Theme.HealthJournal" parent="Base.Theme.HealthJournal" />
|
||||||
|
<style name="CategoryItemStyle">
|
||||||
|
<item name="android:layout_width">wrap_content</item>
|
||||||
|
<item name="android:layout_height">wrap_content</item>
|
||||||
|
<item name="android:layout_marginEnd">10dp</item>
|
||||||
|
<item name="android:orientation">vertical</item>
|
||||||
|
<item name="android:padding">8dp</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="CategoryImageButtonStyle">
|
||||||
|
<item name="android:layout_width">51dp</item>
|
||||||
|
<item name="android:layout_height">51dp</item>
|
||||||
|
<item name="android:layout_gravity">center</item>
|
||||||
|
<item name="android:scaleType">fitXY</item>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<style name="CategoryTextViewStyle">
|
||||||
|
<item name="android:layout_width">match_parent</item>
|
||||||
|
<item name="android:layout_height">wrap_content</item>
|
||||||
|
<item name="android:layout_marginTop">1dp</item>
|
||||||
|
<item name="android:textAlignment">center</item>
|
||||||
|
<item name="android:textColor">@color/black</item>
|
||||||
|
<item name="android:textSize">11sp</item>
|
||||||
|
<item name="android:fontFamily">@font/poppins_regular</item>
|
||||||
|
<item name="android:textStyle">bold</item>
|
||||||
|
</style>
|
||||||
</resources>
|
</resources>
|
Reference in New Issue
Block a user