diff --git a/app/src/main/java/com/example/jnicpp/bowling/BowlingCameraActivity.kt b/app/src/main/java/com/example/jnicpp/bowling/BowlingCameraActivity.kt index b85df59..deadf1a 100644 --- a/app/src/main/java/com/example/jnicpp/bowling/BowlingCameraActivity.kt +++ b/app/src/main/java/com/example/jnicpp/bowling/BowlingCameraActivity.kt @@ -66,7 +66,8 @@ class BowlingCameraActivity : AppCompatActivity(), CameraXController.Callback { // class for FeedbackUI private lateinit var feedbackUI: FeedbackUI private val stepLabels = listOf( - R.string.starting_position, + R.string.pose_phase_waiting, + R.string.pose_phase_starting_stance, R.string.first_step, R.string.second_step, R.string.third_step, @@ -261,7 +262,7 @@ class BowlingCameraActivity : AppCompatActivity(), CameraXController.Callback { binding.btnRecord.isEnabled = false binding.switchPose.isEnabled = false binding.btnShowStep.isEnabled = true - binding.btnShowStep.setText(R.string.starting_position) + binding.btnShowStep.setText(R.string.pose_phase_waiting) } is CameraViewModel.RecordingState.Recording -> { binding.btnRecord.isEnabled = true diff --git a/app/src/main/java/com/example/jnicpp/bowling/FeedbackUI.kt b/app/src/main/java/com/example/jnicpp/bowling/FeedbackUI.kt index 5965672..9cf68fc 100644 --- a/app/src/main/java/com/example/jnicpp/bowling/FeedbackUI.kt +++ b/app/src/main/java/com/example/jnicpp/bowling/FeedbackUI.kt @@ -26,6 +26,7 @@ class FeedbackUI(private val context: Context, private val rootView: View) { private val bannerPaddingY = 24 private val bannerPaddingX = 24 private val camScale = 0.5f + private val bannerTopMargin = 512f private var liveUiWidth: Int = 0 private var liveUiHeight: Int = 0 @@ -98,14 +99,14 @@ class FeedbackUI(private val context: Context, private val rootView: View) { // Center horizontally val left = (canvas.width - bannerWidth) / 2f - val top = 172f * scale + val top = bannerTopMargin * scale val right = left + bannerWidth val bottom = top + bannerHeight // Draw background val rect = RectF(left, top, right, bottom) - // Scale corner radius too + // Scale corner radius val cornerRadius = 24f * scale canvas.drawRoundRect(rect, cornerRadius, cornerRadius, bgPaint) diff --git a/app/src/main/res/layout-land/activity_bowling_camera.xml b/app/src/main/res/layout-land/activity_bowling_camera.xml index 61815fe..b75a32b 100644 --- a/app/src/main/res/layout-land/activity_bowling_camera.xml +++ b/app/src/main/res/layout-land/activity_bowling_camera.xml @@ -172,7 +172,7 @@ android:id="@+id/btn_show_step" android:layout_width="wrap_content" android:layout_height="wrap_content" - android:text="@string/starting_position" + android:text="@string/pose_phase_waiting" android:layout_marginBottom="32dp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintEnd_toEndOf="parent" diff --git a/app/src/main/res/layout/activity_bowling_camera.xml b/app/src/main/res/layout/activity_bowling_camera.xml index 6df2de8..fd6299a 100644 --- a/app/src/main/res/layout/activity_bowling_camera.xml +++ b/app/src/main/res/layout/activity_bowling_camera.xml @@ -126,12 +126,13 @@ app:layout_constraintEnd_toEndOf="parent" android:layout_marginTop="4dp" android:layout_marginEnd="16dp" /> +