Commit 8f214e13 by likorn

Fixed button color in TaskActivity

parent 291fd28e
......@@ -75,21 +75,12 @@ class TaskActivity : AppCompatActivity() {
if (answer.correct) {
answer.card.markCorrect(this@TaskActivity)
tv_response.text = resources.getString(R.string.response_correct)
btn_next.backgroundTintList = ContextCompat.getColorStateList(this,
R.color.colorAccent
)
btn_next.setTextColor(
color(
this,
R.color.transparent_dark_black
)
)
btn_next.backgroundTintList = ContextCompat.getColorStateList(this, R.color.colorAccent)
btn_next.setTextColor(color(this, R.color.transparent_dark_black))
} else {
answer.card.markWrong(this@TaskActivity)
tv_response.text = resources.getString(R.string.response_wrong)
btn_next.backgroundTintList = ContextCompat.getColorStateList(this,
R.color.colorPrimary
)
btn_next.backgroundTintList = ContextCompat.getColorStateList(this, R.color.colorPrimary)
btn_next.setTextColor(Color.WHITE)
}
}
......@@ -120,11 +111,7 @@ class TaskActivity : AppCompatActivity() {
override fun onFinish() {
tv_response.setTextSize(TypedValue.COMPLEX_UNIT_SP, resources.getDimension(R.dimen.response_text_size))
tv_response.text = resources.getString(R.string.time_is_over)
btn_next.background.setColorFilter(
color(
this@TaskActivity,
R.color.colorPrimary
), PorterDuff.Mode.MULTIPLY)
btn_next.backgroundTintList = ContextCompat.getColorStateList(this@TaskActivity, R.color.colorPrimary)
btn_next.setTextColor(Color.WHITE)
btn_next.visibility = View.VISIBLE
disableCards()
......
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 sign in to comment