diff --git a/app/src/main/java/com/denizk0461/studip/adapter/CanteenOfferItemAdapter.kt b/app/src/main/java/com/denizk0461/studip/adapter/CanteenOfferItemAdapter.kt index 0a25dd8..0794fb7 100644 --- a/app/src/main/java/com/denizk0461/studip/adapter/CanteenOfferItemAdapter.kt +++ b/app/src/main/java/com/denizk0461/studip/adapter/CanteenOfferItemAdapter.kt @@ -38,7 +38,8 @@ class CanteenOfferItemAdapter(private val offers: List) : Rec LayoutInflater.from(holder.binding.root.context), ) - line.content.text = offer.title + line.textContent.text = offer.title + line.textPrice.text = offer.price val indices = arrayListOf() offer.dietaryPreferences.filterIndexed { index, char -> if (char == 't') { diff --git a/app/src/main/java/com/denizk0461/studip/fragment/CanteenFragment.kt b/app/src/main/java/com/denizk0461/studip/fragment/CanteenFragment.kt index 033ec8c..74b3ce2 100644 --- a/app/src/main/java/com/denizk0461/studip/fragment/CanteenFragment.kt +++ b/app/src/main/java/com/denizk0461/studip/fragment/CanteenFragment.kt @@ -127,8 +127,6 @@ class CanteenFragment : Fragment() { val prefsRegex = getPrefRegex() - - val filteredForPreferences = if (prefsRegex.toString() == "ffffffffff") { // show all elements and skip filtering this @@ -139,13 +137,13 @@ class CanteenFragment : Fragment() { } } - val a = filteredForPreferences.map { - CanteenOfferGroupElement( - it.title, - it.price, - it.dietaryPreferences, - ) - } +// val a = filteredForPreferences.map { +// CanteenOfferGroupElement( +// it.title, +// it.price, +// it.dietaryPreferences, +// ) +// } val b = filteredForPreferences.map { offer -> CanteenOfferGroup( offer.date, diff --git a/app/src/main/res/layout/fragment_settings.xml b/app/src/main/res/layout/fragment_settings.xml index fa88b1e..057b739 100644 --- a/app/src/main/res/layout/fragment_settings.xml +++ b/app/src/main/res/layout/fragment_settings.xml @@ -156,10 +156,10 @@ + android:layout_height="wrap_content"> + + app:layout_constraintEnd_toEndOf="parent" + android:layout_marginTop="16dp" + android:layout_marginHorizontal="16dp"/> + android:layout_marginTop="8dp" + android:layout_marginBottom="16dp"> diff --git a/app/src/main/res/layout/item_canteen_line.xml b/app/src/main/res/layout/item_canteen_line.xml index a581a9f..c626f56 100644 --- a/app/src/main/res/layout/item_canteen_line.xml +++ b/app/src/main/res/layout/item_canteen_line.xml @@ -3,7 +3,12 @@ android:layout_width="match_parent" android:layout_height="wrap_content" xmlns:app="http://schemas.android.com/apk/res-auto" - android:orientation="horizontal"> + android:orientation="horizontal" + android:background="@drawable/layout_ripple" + android:clickable="true" + android:focusable="true" + android:paddingHorizontal="16dp" + android:paddingVertical="2dp"> + app:layout_constraintEnd_toStartOf="@+id/text_price"/> + + \ No newline at end of file