diff --git a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/view/CountryListView.kt b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/view/CountryListView.kt index 38163a84e6719f8272768ea03de51dc5e558453a..e27696ad3a83aaa6aab2e993243112f972c5ddc2 100644 --- a/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/view/CountryListView.kt +++ b/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/ui/view/CountryListView.kt @@ -20,7 +20,7 @@ class CountryListView(context: Context, attrs: AttributeSet) : LinearLayout(cont private val grid: RecyclerView private val countryNames: TextView - var countries: List<Country> = emptyList() + var countries: List<Country> = defaultCountryList set(value) { field = value.also { countries -> adapterCountryFlags.countryList = countries @@ -41,7 +41,7 @@ class CountryListView(context: Context, attrs: AttributeSet) : LinearLayout(cont // Helper to allow for null in data binding fun setCountryList(countries: List<Country>?) { - this.countries = countries ?: emptyList() + this.countries = countries ?: defaultCountryList } companion object { @@ -51,7 +51,7 @@ class CountryListView(context: Context, attrs: AttributeSet) : LinearLayout(cont private class CountryFlagsAdapter : BaseAdapter<CountryFlagViewHolder>() { - var countryList: List<Country> = emptyList() + var countryList: List<Country> = defaultCountryList set(value) { field = value notifyDataSetChanged() @@ -76,3 +76,5 @@ private class CountryFlagsAdapter : BaseAdapter<CountryFlagViewHolder>() { } } } + +private val defaultCountryList = listOf(Country.DE) diff --git a/Corona-Warn-App/src/main/res/layout/fragment_submission_no_consent_positive_other_warning.xml b/Corona-Warn-App/src/main/res/layout/fragment_submission_no_consent_positive_other_warning.xml index c8ba6938c9021af9d3a28c66218964f9b7c2452c..13c7783754ab29a14726e7b0cb30291c60749444 100644 --- a/Corona-Warn-App/src/main/res/layout/fragment_submission_no_consent_positive_other_warning.xml +++ b/Corona-Warn-App/src/main/res/layout/fragment_submission_no_consent_positive_other_warning.xml @@ -98,7 +98,7 @@ android:id="@+id/countryList" android:layout_width="@dimen/match_constraint" android:layout_height="wrap_content" - android:layout_marginTop="@dimen/spacing_tiny" + android:layout_marginTop="@dimen/spacing_normal" app:layout_constraintEnd_toEndOf="@+id/guideline_end" app:layout_constraintStart_toStartOf="@+id/guideline_start" app:layout_constraintTop_toBottomOf="@+id/submission_positive_other_warning_text_second_part" /> @@ -108,7 +108,7 @@ layout="@layout/include_privacy_card_no_consent" android:layout_width="@dimen/match_constraint" android:layout_height="wrap_content" - android:layout_marginTop="@dimen/spacing_small" + android:layout_marginTop="@dimen/spacing_normal" app:layout_constraintEnd_toStartOf="@+id/guideline_card_end" app:layout_constraintStart_toStartOf="@+id/guideline_card_start" app:layout_constraintTop_toBottomOf="@+id/countryList" /> diff --git a/Corona-Warn-App/src/main/res/layout/include_interop_list_participating_countries_overview.xml b/Corona-Warn-App/src/main/res/layout/include_interop_list_participating_countries_overview.xml index 6ecf73f518ab7120bf5876447faf66fc9bd0052a..15ca518b3cba8e4243ebfeb5aea73d4ade77be22 100644 --- a/Corona-Warn-App/src/main/res/layout/include_interop_list_participating_countries_overview.xml +++ b/Corona-Warn-App/src/main/res/layout/include_interop_list_participating_countries_overview.xml @@ -44,7 +44,7 @@ android:id="@+id/countryList" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginTop="@dimen/spacing_tiny" + android:layout_marginTop="@dimen/spacing_normal" app:countryList="@{countryData}" app:layout_constraintEnd_toEndOf="parent" app:layout_constraintStart_toStartOf="parent" @@ -64,4 +64,4 @@ </androidx.constraintlayout.widget.ConstraintLayout> -</layout> \ No newline at end of file +</layout> diff --git a/Corona-Warn-App/src/main/res/layout/view_country_list_entry_flag_container.xml b/Corona-Warn-App/src/main/res/layout/view_country_list_entry_flag_container.xml index 1d1e7b16c128d1e66548a715fd870d90e1e4c9bd..d29b2dd625a8bd6bbe7b76364724607a7d853bd0 100644 --- a/Corona-Warn-App/src/main/res/layout/view_country_list_entry_flag_container.xml +++ b/Corona-Warn-App/src/main/res/layout/view_country_list_entry_flag_container.xml @@ -3,32 +3,29 @@ xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginTop="8dp" - android:layout_marginBottom="8dp" android:orientation="vertical"> + <View + android:layout_width="match_parent" + android:layout_height="2dp" + android:layout_marginBottom="@dimen/spacing_tiny" + android:background="@color/colorHairline" /> + <androidx.recyclerview.widget.RecyclerView android:id="@+id/flagGrid" android:layout_width="match_parent" android:layout_height="wrap_content" /> - <View - android:layout_width="match_parent" - android:layout_height="3dp" - android:layout_marginTop="@dimen/spacing_small" - android:background="@color/colorHairline" /> - <TextView android:id="@+id/country_list_entry_label" style="@style/subtitle" android:layout_width="match_parent" android:layout_height="wrap_content" - android:layout_marginTop="8dp" - android:layout_marginBottom="8dp" + android:layout_marginVertical="@dimen/spacing_tiny" tools:text="Deutschland, Frankreich" /> <View android:layout_width="match_parent" - android:layout_height="3dp" + android:layout_height="2dp" android:background="@color/colorHairline" /> -</LinearLayout> \ No newline at end of file +</LinearLayout>