Added tuning feature and hand palm action to reset the timer
This commit is contained in:
@@ -71,18 +71,88 @@
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp"
|
||||
android:fontFamily="monospace" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Live step counter: large and centered near the top so it's readable
|
||||
at a glance mid-approach, unlike the small text this replaced.
|
||||
Visibility tracks recording state the same as
|
||||
layout_recording_indicator (see BowlingCameraActivity#renderRecordingState). -->
|
||||
<LinearLayout
|
||||
android:id="@+id/card_step_counter"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="72dp"
|
||||
android:orientation="vertical"
|
||||
android:gravity="center"
|
||||
android:background="@drawable/shape_step_counter_card"
|
||||
android:paddingHorizontal="24dp"
|
||||
android:paddingVertical="8dp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent">
|
||||
|
||||
<!-- Live step counter, resets to 0 when the bowler returns to a
|
||||
stationary starting stance mid-recording (see LiveStepDetector). -->
|
||||
<TextView
|
||||
android:id="@+id/text_step_count"
|
||||
android:id="@+id/text_step_count_big"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:text="@string/step_count_placeholder"
|
||||
android:text="@string/step_count_big_placeholder"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="16sp"
|
||||
android:textSize="40sp"
|
||||
android:textStyle="bold" />
|
||||
|
||||
<TextView
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/step_counter_label"
|
||||
android:textColor="@color/step_counter_accent"
|
||||
android:textSize="12sp"
|
||||
android:letterSpacing="0.15"
|
||||
android:textStyle="bold" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Hold-to-reset gesture: always visible while recording so the
|
||||
mechanism is discoverable (see LiveStepDetector's class doc for why
|
||||
this replaced an automatic stillness-based reset), not just once
|
||||
the bowler is mid-gesture. Text and progress both driven by
|
||||
CameraViewModel.handRaiseProgress. -->
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_reset_hint"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="12dp"
|
||||
android:orientation="horizontal"
|
||||
android:gravity="center_vertical"
|
||||
android:background="@color/overlay_scrim"
|
||||
android:paddingHorizontal="12dp"
|
||||
android:paddingVertical="6dp"
|
||||
android:visibility="gone"
|
||||
tools:visibility="visible"
|
||||
app:layout_constraintBottom_toTopOf="@id/switch_pose"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent">
|
||||
|
||||
<com.google.android.material.progressindicator.CircularProgressIndicator
|
||||
android:id="@+id/progress_hand_raise"
|
||||
android:layout_width="20dp"
|
||||
android:layout_height="20dp"
|
||||
android:indeterminate="false"
|
||||
android:max="100"
|
||||
android:progress="0"
|
||||
app:indicatorSize="20dp"
|
||||
app:trackThickness="3dp"
|
||||
app:indicatorColor="@color/step_counter_accent"
|
||||
app:trackColor="@color/white" />
|
||||
|
||||
<TextView
|
||||
android:id="@+id/text_reset_hint"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:text="@string/reset_hint_idle"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="13sp" />
|
||||
</LinearLayout>
|
||||
|
||||
<!-- Live pose overlay + baked-in-recording toggle. Only togglable while
|
||||
@@ -123,6 +193,19 @@
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<!-- Opens ParameterEditorActivity: only meaningful between recordings
|
||||
(see ParameterEditorActivity's class doc; a save is picked up by
|
||||
the *next* recording), so only shown while Idle. -->
|
||||
<Button
|
||||
android:id="@+id/btn_editor"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="8dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:text="@string/editor_button"
|
||||
app:layout_constraintTop_toBottomOf="@id/btn_switch_camera"
|
||||
app:layout_constraintEnd_toEndOf="parent" />
|
||||
|
||||
<!-- Shown instead of the camera UI when CAMERA/RECORD_AUDIO aren't granted -->
|
||||
<LinearLayout
|
||||
android:id="@+id/layout_permission_rationale"
|
||||
|
||||
Reference in New Issue
Block a user