From 059579c5003dc907247f9779dbc4426bc5c565f6 Mon Sep 17 00:00:00 2001 From: Prince Raj Date: Wed, 27 Dec 2023 20:05:26 +0530 Subject: [PATCH] fix: revamp sorting window of leaderboard page --- .../ui/fragment/LeaderboardFragment.kt | 17 ++-- app/src/main/res/drawable/checkbox_bg.xml | 5 ++ .../main/res/drawable/checkbox_check_bg.xml | 12 +++ .../main/res/drawable/checkbox_uncheck_bg.xml | 12 +++ .../main/res/layout/sort_leader_layout.xml | 82 ++++++++++--------- app/src/main/res/values/strings.xml | 4 +- 6 files changed, 82 insertions(+), 50 deletions(-) create mode 100644 app/src/main/res/drawable/checkbox_bg.xml create mode 100644 app/src/main/res/drawable/checkbox_check_bg.xml create mode 100644 app/src/main/res/drawable/checkbox_uncheck_bg.xml diff --git a/app/src/main/java/com/example/cyclofit/ui/fragment/LeaderboardFragment.kt b/app/src/main/java/com/example/cyclofit/ui/fragment/LeaderboardFragment.kt index 7e78f59..26effff 100644 --- a/app/src/main/java/com/example/cyclofit/ui/fragment/LeaderboardFragment.kt +++ b/app/src/main/java/com/example/cyclofit/ui/fragment/LeaderboardFragment.kt @@ -5,6 +5,7 @@ import android.util.Log import android.view.* import android.widget.Button import android.widget.CheckBox +import android.widget.RadioButton import androidx.appcompat.widget.SearchView.OnQueryTextListener import androidx.core.view.MenuProvider import androidx.recyclerview.widget.LinearLayoutManager @@ -152,13 +153,13 @@ class LeaderboardFragment : BaseFragment() { ) { view, alertDialog -> var boolean = true - val sortName = view.findViewById(R.id.id_tv_sort_by_name) + val sortName = view.findViewById(R.id.id_tv_sort_by_name) val sortDistance = - view.findViewById(R.id.id_tv_sort_by_distance) + view.findViewById(R.id.id_tv_sort_by_distance) val checkAscending = - view.findViewById(R.id.id_tv_sort_ascending) + view.findViewById(R.id.id_tv_sort_ascending) val checkDescending = - view.findViewById(R.id.id_tv_sort_descending) + view.findViewById(R.id.id_tv_sort_descending) val btnSortList = view.findViewById