Added flags in country adapter

This commit is contained in:
Sylvain Berfini 2023-09-20 11:54:01 +02:00
parent cb6850f287
commit e90aa13890
12 changed files with 25 additions and 13 deletions

View file

@ -48,6 +48,9 @@ class CountryPickerAdapter : BaseAdapter(), Filterable {
)
val dialPlan: DialPlan = countries[position]
val flag = view.findViewById<TextView>(R.id.country_flag)
flag.text = dialPlan.flag
val name = view.findViewById<TextView>(R.id.country_name)
name.text = dialPlan.country

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="oval">
<solid android:color="@color/gray_offline"/>
<solid android:color="@color/gray_main2_400"/>
<size android:width="15dp" android:height="15dp"/>
</shape>

View file

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle">
<corners android:radius="20dp" />
<solid android:color="@color/in_call_gray"/>
<solid android:color="@color/gray_600"/>
</shape>

View file

@ -22,7 +22,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="@dimen/in_call_all_actions_menu_height"
android:background="@color/in_call_black"
android:background="@color/grey_900"
app:behavior_hideable="false"
app:behavior_peekHeight="@dimen/in_call_main_actions_menu_height"
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior">

View file

@ -6,11 +6,21 @@
android:orientation="horizontal"
android:padding="5dp">
<androidx.appcompat.widget.AppCompatTextView
style="@style/default_text_style"
android:id="@+id/country_flag"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:paddingStart="5dp"
android:paddingEnd="5dp" />
<androidx.appcompat.widget.AppCompatTextView
style="@style/default_text_style"
android:id="@+id/country_name"
android:layout_width="wrap_content"
android:layout_height="match_parent" />
android:layout_height="match_parent"
android:paddingStart="5dp"
android:paddingEnd="5dp" />
<androidx.appcompat.widget.AppCompatTextView
style="@style/default_text_style"

View file

@ -27,7 +27,7 @@
android:id="@+id/constraint_layout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/in_call_black">
android:background="@color/grey_900">
<androidx.constraintlayout.widget.Guideline
android:id="@+id/hinge_top"

View file

@ -22,7 +22,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="@dimen/in_call_all_actions_menu_height"
android:background="@color/in_call_black"
android:background="@color/grey_900"
app:behavior_hideable="false"
app:behavior_peekHeight="@dimen/in_call_main_actions_menu_height"
app:layout_behavior="com.google.android.material.bottomsheet.BottomSheetBehavior">

View file

@ -16,7 +16,7 @@
android:layout_width="match_parent"
android:layout_height="@dimen/in_call_main_actions_menu_height"
android:paddingBottom="5dp"
android:background="@color/in_call_black">
android:background="@color/grey_900">
<com.google.android.material.bottomsheet.BottomSheetDragHandleView
android:onClick="@{() -> viewModel.toggleExpandActionsMenu()}"

View file

@ -12,7 +12,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/in_call_black"
android:background="@color/grey_900"
android:paddingTop="15dp"
android:paddingBottom="15dp">

View file

@ -13,7 +13,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/in_call_black">
android:background="@color/grey_900">
<ImageView
android:id="@+id/call_direction_icon"

View file

@ -13,7 +13,7 @@
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/in_call_black">
android:background="@color/grey_900">
<ImageView
android:id="@+id/call_direction_icon"

View file

@ -25,6 +25,8 @@
<color name="gray_300">#C9C9C9</color>
<color name="gray_400">#949494</color>
<color name="gray_500">#4E4E4E</color>
<color name="gray_600">#2E3030</color>
<color name="grey_900">#070707</color>
<color name="red_danger_200">#F5CCBE</color>
<color name="red_danger_500">#DD5F5F</color>
@ -37,8 +39,5 @@
<color name="blue_info_500">#4AA8FF</color>
<color name="orange_away">#FFA645</color>
<color name="gray_offline">#E1E1E1</color>
<color name="transparent_light_orange">#1ABF4601</color>
<color name="in_call_black">#070707</color>
<color name="in_call_gray">#2E3030</color>
</resources>