Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- R.id.selanjutnyaMulaiUjianFragmentTV -> {
- progressBarHolderLoginCL.visibility = View.VISIBLE
- AMulaiUjianFragmentTV.setBackgroundResource(R.drawable.bg_btn_v3)
- BMulaiUjianFragmentTV.setBackgroundResource(R.drawable.bg_btn_v3)
- CMulaiUjianFragmentTV.setBackgroundResource(R.drawable.bg_btn_v3)
- DMulaiUjianFragmentTV.setBackgroundResource(R.drawable.bg_btn_v3)
- if ( jawaban == ""){
- progressBarHolderLoginCL.visibility = View.GONE
- Utils.INSTANCE.ToastyInfo(this.requireContext(), "Silahkan pilih jawaban dulu")
- }else{
- hal++
- if (position == index) {
- Hawk.put("position" , position)
- Hawk.put("nilai" , nilai)
- val bundle = bundleOf("nilai" to nilai)
- findNavController().navigate(
- R.id.action_mulaiUjianFragment_to_hasilUjianFragment,
- bundle
- )
- timer.cancel()
- } else {
- if (jawaban == currentAnswer) {
- nilai += poin
- if (position != index) {
- position++
- jawaban = ""
- Hawk.put("position" , position)
- Hawk.put("nilai" , nilai)
- vm.getSoal(API_URL.API_KEY, kelas_id, evaluasi_id)
- //textColor
- AMulaiUjianFragmentTV.setTextColor(ContextCompat.getColor(this.requireContext(), R.color.greyText))
- BMulaiUjianFragmentTV.setTextColor(ContextCompat.getColor(this.requireContext(), R.color.greyText))
- CMulaiUjianFragmentTV.setTextColor(ContextCompat.getColor(this.requireContext(), R.color.greyText))
- DMulaiUjianFragmentTV.setTextColor(ContextCompat.getColor(this.requireContext(), R.color.greyText))
- }
- } else {
- nilai += 0
- if (position != index) {
- position++
- jawaban = ""
- Hawk.put("nilai" , nilai)
- vm.getSoal(API_URL.API_KEY, kelas_id, evaluasi_id)
- //textColor
- Hawk.put("position" , position)
- AMulaiUjianFragmentTV.setTextColor(ContextCompat.getColor(this.requireContext(), R.color.greyText))
- BMulaiUjianFragmentTV.setTextColor(ContextCompat.getColor(this.requireContext(), R.color.greyText))
- CMulaiUjianFragmentTV.setTextColor(ContextCompat.getColor(this.requireContext(), R.color.greyText))
- DMulaiUjianFragmentTV.setTextColor(ContextCompat.getColor(this.requireContext(), R.color.greyText))
- }
- }
- }
- }
- }
Add Comment
Please, Sign In to add comment