nextcloud-talk-android/app/src/main/res/layout/activity_take_picture.xml

177 lines
7.2 KiB
XML
Raw Normal View History

<?xml version="1.0" encoding="utf-8"?><!--
~ Nextcloud Talk application
~
~ @author Andy Scherzinger
~ @author Stefan Niedermann
~ Copyright (C) 2021 Andy Scherzinger <info@andy-scherzinger.de>
~ Copyright (C) 2021 Stefan Niedermann <info@niedermann.it>
~
~ This program is free software: you can redistribute it and/or modify
~ it under the terms of the GNU General Public License as published by
~ the Free Software Foundation, either version 3 of the License, or
~ at your option) any later version.
~
~ This program is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
~ GNU General Public License for more details.
~
~ You should have received a copy of the GNU General Public License
~ along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@android:color/black"
android:fitsSystemWindows="true"
tools:theme="@style/TransparentTheme">
<androidx.camera.view.PreviewView
android:id="@+id/preview"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<com.github.chrisbanes.photoview.PhotoView
android:id="@+id/photo_preview"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:contentDescription="@null"
android:scaleType="fitStart"
android:visibility="invisible" />
<com.google.android.material.button.MaterialButton
android:id="@+id/toggle_torch"
style="@style/Widget.AppTheme.Button.IconButton"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:layout_marginStart="0dp"
android:layout_marginTop="12dp"
android:layout_marginEnd="12dp"
android:layout_marginBottom="12dp"
android:contentDescription="@string/take_photo_toggle_torch"
android:insetLeft="4dp"
android:insetTop="4dp"
android:insetRight="4dp"
android:insetBottom="4dp"
android:tint="@color/white"
app:backgroundTint="#99121212"
app:cornerRadius="@dimen/button_corner_radius"
app:elevation="0dp"
app:icon="@drawable/ic_baseline_flash_on_24"
app:iconGravity="textStart"
app:iconPadding="0dp"
app:iconSize="24dp"
app:iconTint="@color/white"
app:layout_constraintBottom_toBottomOf="@id/takePhoto"
app:layout_constraintEnd_toStartOf="@id/takePhoto"
app:layout_constraintStart_toStartOf="parent" />
<com.google.android.material.button.MaterialButton
android:id="@+id/switchCamera"
style="@style/Widget.AppTheme.Button.IconButton"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:layout_marginStart="12dp"
android:layout_marginTop="12dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="12dp"
android:contentDescription="@string/take_photo_switch_camera"
android:insetLeft="4dp"
android:insetTop="4dp"
android:insetRight="4dp"
android:insetBottom="4dp"
android:padding="0dp"
android:tint="@android:color/white"
app:backgroundTint="#99121212"
app:cornerRadius="@dimen/button_corner_radius"
app:elevation="0dp"
app:icon="@drawable/ic_baseline_flip_camera_android_24"
app:iconGravity="textStart"
app:iconPadding="0dp"
app:iconSize="24dp"
app:iconTint="@color/white"
app:layout_constraintBottom_toBottomOf="@id/takePhoto"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/takePhoto" />
<com.google.android.material.button.MaterialButton
android:id="@+id/retake"
style="@style/Widget.AppTheme.Button.IconButton"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:layout_marginBottom="12dp"
android:contentDescription="@string/take_photo_retake_photo"
android:insetLeft="0dp"
android:insetTop="0dp"
android:insetRight="0dp"
android:insetBottom="0dp"
android:padding="0dp"
android:tint="@android:color/white"
android:visibility="gone"
app:backgroundTint="#99121212"
app:cornerRadius="@dimen/button_corner_radius"
app:elevation="0dp"
app:icon="@drawable/ic_refresh"
app:iconGravity="textStart"
app:iconPadding="0dp"
app:iconSize="24dp"
app:iconTint="@color/white"
app:layout_constraintBottom_toBottomOf="@id/takePhoto"
app:layout_constraintEnd_toStartOf="@id/takePhoto"
app:layout_constraintStart_toStartOf="parent" />
<com.google.android.material.floatingactionbutton.FloatingActionButton
android:id="@+id/takePhoto"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginBottom="@dimen/standard_double_margin"
android:contentDescription="@string/take_photo"
android:tint="@android:color/white"
app:backgroundTint="@color/colorPrimary"
app:fabCustomSize="72dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:srcCompat="@drawable/ic_baseline_photo_camera_24" />
<com.google.android.material.button.MaterialButton
android:id="@+id/send"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_alignParentEnd="true"
android:contentDescription="@string/take_photo_switch_camera"
android:paddingStart="24dp"
android:paddingTop="16dp"
android:paddingEnd="24dp"
android:paddingBottom="16dp"
android:text="@string/take_photo_send"
android:textAllCaps="false"
android:textColor="@color/white"
android:textSize="16sp"
android:theme="@style/Button.Primary"
android:tint="@android:color/white"
android:visibility="gone"
app:backgroundTint="@color/colorPrimary"
app:cornerRadius="48dp"
app:elevation="0dp"
app:icon="@drawable/ic_send"
app:iconGravity="textStart"
app:iconPadding="8dp"
app:iconSize="24dp"
app:iconTint="@color/white"
app:layout_constraintBottom_toBottomOf="@id/takePhoto"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/takePhoto" />
</androidx.constraintlayout.widget.ConstraintLayout>