layouts magic: added notes to carbs/bolus treatments list

This commit is contained in:
Sergey Zorchenko 2022-06-22 23:25:31 +03:00
parent 1004832243
commit 127164e8f0
2 changed files with 14 additions and 0 deletions

View file

@ -268,6 +268,10 @@ class TreatmentsBolusCarbsFragment : DaggerFragment() {
}
holder.binding.calculation.tag = ml
var notes = ml.carbs?.notes ?: ml.bolus?.notes ?: ""
holder.binding.notes.text = notes
holder.binding.notes.visibility = if (notes != "") View.VISIBLE else View.GONE
}
override fun getItemCount() = mealLinks.size

View file

@ -271,6 +271,16 @@
</LinearLayout>
<TextView
android:id="@+id/notes"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingStart="20dp"
android:paddingEnd="10dp"
android:textAppearance="?android:attr/textAppearanceSmall"
tools:ignore="RtlSymmetry"
tools:text="Notes" />
</LinearLayout>
</com.google.android.material.card.MaterialCardView>