Commit 8f214e13 by likorn

Fixed button color in TaskActivity

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