Commit d42961fc authored by Niklas Fix's avatar Niklas Fix 🎓

change #61

parent 4ccdaeff
......@@ -8,6 +8,7 @@ import android.widget.ImageView
import android.widget.TextView
import androidx.cardview.widget.CardView
import androidx.constraintlayout.widget.ConstraintLayout
import androidx.core.content.ContextCompat
import androidx.recyclerview.widget.RecyclerView
import de.akamu.tudarmstadt.R
import de.akamu.tudarmstadt.features.dashboard.duels.listener.DuelClickListener
......@@ -89,12 +90,12 @@ class DuelViewHolder(
private fun getDuelButtonBackground(duelStatus: CharSequence?): Drawable? {
return when (duelStatus) {
context.getString(R.string.duel_status_won) -> context.getDrawable(R.color.colorPlayWon)
context.getString(R.string.duel_status_lost) -> context.getDrawable(R.color.colorLost)
context.getString(R.string.duel_status_tie) -> context.getDrawable(R.color.colorWaitTie)
context.getString(R.string.duel_status_play) -> context.getDrawable(R.color.colorPlayWon)
context.getString(R.string.duel_status_won) -> ContextCompat.getDrawable(context, R.color.colorPlayWon)
context.getString(R.string.duel_status_lost) -> ContextCompat.getDrawable(context, R.color.colorLost)
context.getString(R.string.duel_status_tie) -> ContextCompat.getDrawable(context, R.color.colorTie)
context.getString(R.string.duel_status_play) -> ContextCompat.getDrawable(context, R.color.colorPlayWon)
else -> {
context.getDrawable(R.color.colorWaitTie)
ContextCompat.getDrawable(context, R.color.colorWait)
}
}
}
......
......@@ -19,7 +19,8 @@
<!-- DUEL COLORS -->
<color name="colorPlayWon">#659157</color>
<color name="colorWaitTie">#FFC857</color>
<color name="colorWait">#DCD27C</color>
<color name="colorTie">#FFC857</color>
<color name="colorLost">#C95D63</color>
<!-- TEXT COLORS -->
......
......@@ -19,7 +19,8 @@
<!-- DUEL COLORS -->
<color name="colorPlayWon">#659157</color>
<color name="colorWaitTie">#FFC857</color>
<color name="colorWait">#DCD27C</color>
<color name="colorTie">#FFC857</color>
<color name="colorLost">#C95D63</color>
<!-- TEXT COLORS -->
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment