diff --git a/app/src/main/java/ch/sdp/vibester/fragment/ScoreBoardFragment.kt b/app/src/main/java/ch/sdp/vibester/fragment/ScoreBoardFragment.kt index 2d74e2eed..21ebc5ade 100644 --- a/app/src/main/java/ch/sdp/vibester/fragment/ScoreBoardFragment.kt +++ b/app/src/main/java/ch/sdp/vibester/fragment/ScoreBoardFragment.kt @@ -55,7 +55,7 @@ class ScoreBoardFragment : Fragment(), OnItemClickListener, View.OnClickListener } private fun selectScoreboard() { - val sortedBy = "scores/" + genre + val sortedBy = "scores/$genre" requireView().findViewById(R.id.genrePerScoreboard).visibility = GONE requireView().findViewById(R.id.scoreboard_content_scrolling).visibility = VISIBLE @@ -112,13 +112,13 @@ class ScoreBoardFragment : Fragment(), OnItemClickListener, View.OnClickListener */ override fun onItemClick(position: Int) { val intent = Intent(requireActivity(), PublicProfileActivity::class.java) - intent.putExtra("UserId", players.get(position).uid) + intent.putExtra("UserId", players[position].uid) intent.putExtra("ScoresOrFollowing", R.string.profile_scores.toString() ) startActivity(intent) } override fun onClick(v: View?) { - when(v!!.getId()) { + when(v!!.id) { R.id.btsButton -> { genre = "BTS"; selectScoreboard() } diff --git a/app/src/main/res/layout/genre_for_scoreboard.xml b/app/src/main/res/layout/genre_for_scoreboard.xml index 5193403f9..944065c1c 100644 --- a/app/src/main/res/layout/genre_for_scoreboard.xml +++ b/app/src/main/res/layout/genre_for_scoreboard.xml @@ -37,7 +37,7 @@ app:layout_constraintHorizontal_bias="0.066" app:layout_constraintStart_toStartOf="parent" app:layout_constraintTop_toTopOf="parent" - app:layout_constraintVertical_bias="0.687"> + app:layout_constraintVertical_bias="0.687" /> + app:layout_constraintVertical_bias="0.687" /> + app:layout_constraintVertical_bias="0.403" /> + app:layout_constraintVertical_bias="0.402" /> + app:layout_constraintVertical_bias="0.136" /> + app:layout_constraintVertical_bias="0.136" />