Add CameraXFlashToggleView and selfie flash.
BIN
res/drawable-hdpi/flash_auto_32.webp
Normal file
|
After Width: | Height: | Size: 1.4 KiB |
BIN
res/drawable-hdpi/flash_off_32.webp
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
res/drawable-hdpi/flash_on_32.webp
Normal file
|
After Width: | Height: | Size: 920 B |
BIN
res/drawable-mdpi/flash_auto_32.webp
Normal file
|
After Width: | Height: | Size: 926 B |
BIN
res/drawable-mdpi/flash_off_32.webp
Normal file
|
After Width: | Height: | Size: 776 B |
BIN
res/drawable-mdpi/flash_on_32.webp
Normal file
|
After Width: | Height: | Size: 588 B |
BIN
res/drawable-xhdpi/flash_auto_32.webp
Normal file
|
After Width: | Height: | Size: 2.0 KiB |
BIN
res/drawable-xhdpi/flash_off_32.webp
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
res/drawable-xhdpi/flash_on_32.webp
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
res/drawable-xxhdpi/flash_auto_32.webp
Normal file
|
After Width: | Height: | Size: 3.4 KiB |
BIN
res/drawable-xxhdpi/flash_off_32.webp
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
res/drawable-xxhdpi/flash_on_32.webp
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
res/drawable-xxxhdpi/flash_auto_32.webp
Normal file
|
After Width: | Height: | Size: 4.2 KiB |
BIN
res/drawable-xxxhdpi/flash_off_32.webp
Normal file
|
After Width: | Height: | Size: 3.3 KiB |
BIN
res/drawable-xxxhdpi/flash_on_32.webp
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
6
res/drawable/camerax_flash_toggle.xml
Normal file
@@ -0,0 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<selector xmlns:android="http://schemas.android.com/apk/res/android" xmlns:app="http://schemas.android.com/apk/res-auto">
|
||||
<item app:state_flash_auto="true" android:drawable="@drawable/flash_auto_32" />
|
||||
<item app:state_flash_off="true" android:drawable="@drawable/flash_off_32" />
|
||||
<item app:state_flash_on="true" android:drawable="@drawable/flash_on_32" />
|
||||
</selector>
|
||||
@@ -17,6 +17,16 @@
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"/>
|
||||
|
||||
<org.thoughtcrime.securesms.mediasend.camerax.CameraXFlashToggleView
|
||||
android:id="@+id/camera_flash_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="14dp"
|
||||
android:src="@drawable/camerax_flash_toggle"
|
||||
app:layout_constraintStart_toEndOf="@+id/camera_flip_button"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/camera_flip_button"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -60,5 +70,16 @@
|
||||
app:layout_constraintEnd_toEndOf="@id/camera_capture_button"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<View
|
||||
android:id="@+id/camera_selfie_flash"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:alpha="0"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:background="@color/white" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
@@ -17,6 +17,16 @@
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
|
||||
<org.thoughtcrime.securesms.mediasend.camerax.CameraXFlashToggleView
|
||||
android:id="@+id/camera_flash_button"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginTop="14dp"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:src="@drawable/camerax_flash_toggle"
|
||||
app:layout_constraintEnd_toStartOf="@+id/camera_flip_button"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
<ImageButton
|
||||
android:id="@+id/camera_flip_button"
|
||||
android:layout_width="wrap_content"
|
||||
@@ -61,5 +71,16 @@
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
tools:visibility="visible" />
|
||||
|
||||
<View
|
||||
android:id="@+id/camera_selfie_flash"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:alpha="0"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:background="@color/white" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
|
||||
|
||||
@@ -362,4 +362,10 @@
|
||||
<enum name="top" value="1" />
|
||||
</attr>
|
||||
</declare-styleable>
|
||||
|
||||
<declare-styleable name="CameraXFlashState">
|
||||
<attr name="state_flash_auto" format="boolean" />
|
||||
<attr name="state_flash_off" format="boolean" />
|
||||
<attr name="state_flash_on" format="boolean" />
|
||||
</declare-styleable>
|
||||
</resources>
|
||||
|
||||