layouts magic: added notes
to carbs/bolus treatments list
This commit is contained in:
parent
1004832243
commit
127164e8f0
|
@ -268,6 +268,10 @@ class TreatmentsBolusCarbsFragment : DaggerFragment() {
|
||||||
}
|
}
|
||||||
|
|
||||||
holder.binding.calculation.tag = ml
|
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
|
override fun getItemCount() = mealLinks.size
|
||||||
|
|
|
@ -271,6 +271,16 @@
|
||||||
|
|
||||||
</LinearLayout>
|
</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>
|
</LinearLayout>
|
||||||
|
|
||||||
</com.google.android.material.card.MaterialCardView>
|
</com.google.android.material.card.MaterialCardView>
|
||||||
|
|
Loading…
Reference in a new issue