diff --git a/android/app/src/main/kotlin/com/chicagoroboto/features/sessiondetail/feedback/FeedbackDialog.kt b/android/app/src/main/kotlin/com/chicagoroboto/features/sessiondetail/feedback/FeedbackDialog.kt index 438595c..e2715e6 100644 --- a/android/app/src/main/kotlin/com/chicagoroboto/features/sessiondetail/feedback/FeedbackDialog.kt +++ b/android/app/src/main/kotlin/com/chicagoroboto/features/sessiondetail/feedback/FeedbackDialog.kt @@ -11,6 +11,7 @@ import com.chicagoroboto.features.sessiondetail.SessionDetailComponent import com.chicagoroboto.model.Feedback import kotlinx.android.synthetic.main.dialog_feedback.view.* import javax.inject.Inject +import kotlin.math.roundToInt class FeedbackDialog(context: Context, val sessionId: String) : Dialog(context, true, null), FeedbackMvp.View { @@ -25,7 +26,7 @@ class FeedbackDialog(context: Context, val sessionId: String) : Dialog(context, view = LayoutInflater.from(context).inflate(R.layout.dialog_feedback, null, false) view.submit.setOnClickListener { - presenter.submit(view.overall.rating, view.technical.rating, view.speaker.rating) + presenter.submit(view.overall.rating, view.technical.progress.toFloat(), view.speaker.rating) } view.cancel.setOnClickListener { @@ -47,7 +48,7 @@ class FeedbackDialog(context: Context, val sessionId: String) : Dialog(context, override fun setFeedback(feedback: Feedback) { view.overall.rating = feedback.overall ?: 0f - view.technical.rating = feedback.technical ?: 0f + view.technical.progress = feedback.technical?.roundToInt() ?: 0 view.speaker.rating = feedback.speaker ?: 0f } } \ No newline at end of file diff --git a/android/app/src/main/res/drawable/ic_technical_thumb.xml b/android/app/src/main/res/drawable/ic_technical_thumb.xml new file mode 100644 index 0000000..de44458 --- /dev/null +++ b/android/app/src/main/res/drawable/ic_technical_thumb.xml @@ -0,0 +1,10 @@ + + + + + + + \ No newline at end of file diff --git a/android/app/src/main/res/drawable/ic_technical_tick.xml b/android/app/src/main/res/drawable/ic_technical_tick.xml new file mode 100644 index 0000000..8566291 --- /dev/null +++ b/android/app/src/main/res/drawable/ic_technical_tick.xml @@ -0,0 +1,9 @@ + + + + + + \ No newline at end of file diff --git a/android/app/src/main/res/layout/dialog_feedback.xml b/android/app/src/main/res/layout/dialog_feedback.xml index a20c675..aaaf731 100644 --- a/android/app/src/main/res/layout/dialog_feedback.xml +++ b/android/app/src/main/res/layout/dialog_feedback.xml @@ -1,71 +1,127 @@ - + android:paddingRight="16dp" + android:paddingTop="16dp"> + + android:text="@string/feedback_title" + android:textAppearance="?android:textAppearanceLarge" /> + + app:layout_constraintTop_toBottomOf="@id/feedback_title" /> + + android:numStars="5" + app:layout_constraintTop_toBottomOf="@id/overall_title" /> + - + + + android:text="@string/not_enough" + android:textColor="?attr/colorControlActivated" + app:layout_constraintTop_toBottomOf="@id/technical_title" /> + + + + + + + + app:layout_constraintTop_toBottomOf="@id/technical" /> + - + android:numStars="5" + app:layout_constraintTop_toBottomOf="@id/speaker_title" /> + +