Skip to content
Snippets Groups Projects
Unverified Commit d6b0f6b3 authored by Chilja Gossow's avatar Chilja Gossow Committed by GitHub
Browse files

Adjusts dividers in country list view (EXPOSUREAPP-4126) (#1807)

parent de0f4228
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......@@ -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" />
......
......@@ -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>
......@@ -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>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment