Skip to content

Commit 2136c74

Browse files
committed
Revert "Display info in exam screen to indicate if exam is ended (#357)"
This reverts commit 3c3d7d3.
1 parent da800f1 commit 2136c74

4 files changed

Lines changed: 0 additions & 48 deletions

File tree

course/src/main/java/in/testpress/course/fragments/ExamStartScreenFragment.kt

Lines changed: 0 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,11 @@ import `in`.testpress.course.domain.getGreenDaoContentAttempt
77
import `in`.testpress.course.ui.ContentActivity
88
import `in`.testpress.exam.api.TestpressExamApiClient.STATE_PAUSED
99
import `in`.testpress.util.ViewUtils
10-
import android.annotation.SuppressLint
1110
import android.os.Bundle
1211
import android.text.Html
1312
import android.view.LayoutInflater
1413
import android.view.View
1514
import android.view.ViewGroup
16-
import android.widget.ImageView
1715
import android.widget.LinearLayout
1816
import android.widget.TextView
1917

@@ -32,8 +30,6 @@ class ExamStartScreenFragment : BaseExamWidgetFragment() {
3230
private lateinit var negativeMarkLabel: TextView
3331
private lateinit var dateLabel: TextView
3432
private lateinit var languageLabel: TextView
35-
private lateinit var examStatusDescription: TextView
36-
private lateinit var examStatusIcon: ImageView
3733

3834
override fun onCreateView(
3935
inflater: LayoutInflater,
@@ -64,8 +60,6 @@ class ExamStartScreenFragment : BaseExamWidgetFragment() {
6460
negativeMarkLabel = view.findViewById(R.id.negative_marks_label)
6561
dateLabel = view.findViewById(R.id.date_label)
6662
languageLabel = view.findViewById(R.id.language_label)
67-
examStatusDescription = view.findViewById(R.id.exam_status_description)
68-
examStatusIcon = view.findViewById(R.id.exam_status_icon)
6963

7064
ViewUtils.setTypeface(
7165
arrayOf(
@@ -98,7 +92,6 @@ class ExamStartScreenFragment : BaseExamWidgetFragment() {
9892
showDescription()
9993
showOrHideExamDate(exam)
10094
showExamDuration(exam)
101-
showExamStatus(exam)
10295
}
10396

10497
private fun showDescription() {
@@ -127,31 +120,4 @@ class ExamStartScreenFragment : BaseExamWidgetFragment() {
127120
}
128121
}
129122
}
130-
131-
private fun showExamStatus(exam: DomainExamContent) {
132-
if (exam.isEnded()){
133-
displayExamEndedMessage()
134-
}
135-
else {
136-
displayAllTheBestMessage()
137-
}
138-
}
139-
140-
@SuppressLint("UseCompatLoadingForDrawables")
141-
private fun displayExamEndedMessage(){
142-
examStatusDescription.text = getString(R.string.testpress_exam_ended)
143-
examStatusDescription.setTextColor(resources.getColor(R.color.testpress_red))
144-
145-
examStatusIcon.setImageDrawable(resources.getDrawable(R.drawable.ic_baseline_info_24))
146-
examStatusIcon.setColorFilter(resources.getColor(R.color.testpress_red))
147-
}
148-
149-
@SuppressLint("UseCompatLoadingForDrawables")
150-
private fun displayAllTheBestMessage(){
151-
examStatusDescription.text = getString(R.string.testpress_all_the_best)
152-
examStatusDescription.setTextColor(resources.getColor(R.color.testpress_black))
153-
154-
examStatusIcon.setImageDrawable(resources.getDrawable(R.drawable.ic_thumb_up_black_18dp))
155-
examStatusIcon.setColorFilter(resources.getColor(R.color.testpress_black))
156-
}
157123
}

course/src/main/res/drawable/ic_baseline_info_24.xml

Lines changed: 0 additions & 10 deletions
This file was deleted.

exam/src/main/res/layout-xlarge/testpress_exam_details_layout.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,6 @@
223223
tools:ignore="UseCompoundDrawables">
224224

225225
<ImageView
226-
android:id="@+id/exam_status_icon"
227226
android:layout_width="18dp"
228227
android:layout_height="18dp"
229228
android:tint="@color/testpress_black"
@@ -232,7 +231,6 @@
232231
android:src="@drawable/ic_thumb_up_black_18dp" />
233232

234233
<TextView
235-
android:id="@+id/exam_status_description"
236234
android:layout_width="wrap_content"
237235
android:layout_height="wrap_content"
238236
android:textColor="@color/testpress_black"

exam/src/main/res/layout/testpress_exam_details_layout.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,6 @@
215215
tools:ignore="UseCompoundDrawables">
216216

217217
<ImageView
218-
android:id="@+id/exam_status_icon"
219218
android:layout_width="18dp"
220219
android:layout_height="18dp"
221220
android:tint="@color/testpress_black"
@@ -225,7 +224,6 @@
225224
/>
226225

227226
<TextView
228-
android:id="@+id/exam_status_description"
229227
android:layout_width="wrap_content"
230228
android:layout_height="wrap_content"
231229
android:textColor="@color/testpress_black"

0 commit comments

Comments
 (0)