disable settings icon when recording

- disable settings icon when recording video and enable when recording stopped
- create ic_settings vector drawable resource that uses the @color/camera_option_color fillColor for simplicity.
This commit is contained in:
darthpaul 2022-10-06 23:08:54 +01:00
parent b6133a9944
commit a83aa1c2e2
3 changed files with 14 additions and 1 deletions

View File

@ -687,6 +687,7 @@ class MainActivity : SimpleActivity(), PhotoProcessor.MediaSavedListener, Camera
shutter.isSelected = true
toggle_camera.beInvisible()
change_resolution.isEnabled = false
settings.isEnabled = false
video_rec_curr_timer.beVisible()
}
@ -696,6 +697,7 @@ class MainActivity : SimpleActivity(), PhotoProcessor.MediaSavedListener, Camera
video_rec_curr_timer.text = 0.getFormattedDuration()
video_rec_curr_timer.beGone()
change_resolution.isEnabled = true
settings.isEnabled = true
toggle_camera.beVisible()
}

View File

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:fillColor="@color/camera_option_color"
android:pathData="M19.5 12c0-0.23-0.01-0.45-0.03-0.68l1.86-1.41c0.4-0.3 0.51-0.86 0.26-1.3l-1.87-3.23c-0.25-0.44-0.79-0.62-1.25-0.42l-2.15 0.91c-0.37-0.26-0.76-0.49-1.17-0.68l-0.29-2.31C14.8 2.38 14.37 2 13.87 2h-3.73c-0.51 0-0.94 0.38-1 0.88L8.85 5.19c-0.41 0.19-0.8 0.42-1.17 0.68L5.53 4.96c-0.46-0.2-1-0.02-1.25 0.42L2.41 8.62c-0.25 0.44-0.14 0.99 0.26 1.3l1.86 1.41C4.51 11.55 4.5 11.77 4.5 12s0.01 0.45 0.03 0.68l-1.86 1.41c-0.4 0.3-0.51 0.86-0.26 1.3l1.87 3.23c0.25 0.44 0.79 0.62 1.25 0.42l2.15-0.91c0.37 0.26 0.76 0.49 1.17 0.68l0.29 2.31C9.2 21.62 9.63 22 10.13 22h3.73c0.5 0 0.93-0.38 0.99-0.88l0.29-2.31c0.41-0.19 0.8-0.42 1.17-0.68l2.15 0.91c0.46 0.2 1 0.02 1.25-0.42l1.87-3.23c0.25-0.44 0.14-0.99-0.26-1.3l-1.86-1.41c0.03-0.23 0.04-0.45 0.04-0.68zm-7.46 3.5c-1.93 0-3.5-1.57-3.5-3.5s1.57-3.5 3.5-3.5 3.5 1.57 3.5 3.5-1.57 3.5-3.5 3.5z" />
</vector>

View File

@ -43,7 +43,7 @@
android:layout_weight="1"
android:contentDescription="@string/settings"
android:padding="@dimen/normal_margin"
app:icon="@drawable/ic_settings_cog_vector"
app:icon="@drawable/ic_settings"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/change_resolution"
app:layout_constraintTop_toTopOf="@id/toggle_flash" />