Skip to content

Commit

Permalink
exam checkbox color - darkmode compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
Kuljeet1998 committed Oct 16, 2024
1 parent 4554aa4 commit 432ec59
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import android.view.View
import android.view.ViewGroup
import android.widget.CompoundButton
import android.widget.RadioButton
import androidx.core.content.ContextCompat
import androidx.core.widget.NestedScrollView
import com.google.android.material.snackbar.Snackbar
import com.google.gson.JsonObject
Expand Down Expand Up @@ -188,6 +189,8 @@ class TakeExamFragment : BaseExamFragment(), View.OnClickListener, CompoundButto
if (isRadio) {
fragmentTakeExamBinding.groupChoices.addView(rdBtn)
} else {
rdBtn.setTextColor(resources.getColor(R.color.daynight_textColor))
rdBtn.buttonTintList = ContextCompat.getColorStateList(requireContext(), R.color.daynight_textColor)
fragmentTakeExamBinding.llCheckbox.addView(rdBtn)
}
}
Expand Down

0 comments on commit 432ec59

Please sign in to comment.