layouts magic: added notes
to carbs/bolus treatments list
This commit is contained in:
parent
1004832243
commit
127164e8f0
2 changed files with 14 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Reference in a new issue