SmashKs/OneShoot

View on GitHub
presentation/src/main/res-features/camera/layout/fragment_take_a_pic.xml

Summary

Maintainability
Test Coverage
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2019 The Smash Ks Open Project
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~       http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<androidx.constraintlayout.widget.ConstraintLayout
    android:id="@+id/base_layout"
    style="@style/Constraint.MatchParent"
    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"
    tools:context=".features.photograph.TakeAPicFragment">

    <!--<smash.ks.com.oneshoot.widgets.customize.camera.view.CameraView-->
    <!--android:id="@+id/cv_camera"-->
    <!--style="@style/Constraint.Any.MatchParent"-->
    <!--android:adjustViewBounds="true"-->
    <!--android:background="@android:color/black"-->
    <!--app:autoFocus="true"/>-->

    <com.otaliastudios.cameraview.CameraView
        android:id="@+id/cv_camera"
        style="@style/Constraint.Any.MatchParent"
        android:keepScreenOn="true"
        app:cameraPlaySounds="false"/>

    <smash.ks.com.oneshoot.widgets.customize.selectable.SelectableAreaView
        android:id="@+id/sav_selection"
        style="@style/Camera.Area.Selection"
        app:layout_constraintBottom_toBottomOf="@+id/cv_camera"
        app:layout_constraintEnd_toEndOf="@+id/cv_camera"
        app:layout_constraintStart_toStartOf="@+id/cv_camera"
        app:layout_constraintTop_toTopOf="@+id/cv_camera"/>

    <View
        android:id="@+id/v_flash"
        style="@style/Constraint.Any"
        android:background="@color/flash_masking"
        android:visibility="invisible"
        app:layout_constraintBottom_toBottomOf="@+id/cv_camera"
        app:layout_constraintEnd_toEndOf="@+id/cv_camera"
        app:layout_constraintStart_toStartOf="@+id/cv_camera"
        app:layout_constraintTop_toTopOf="@+id/cv_camera"/>

    <include layout="@layout/merge_bottom_shot_bar"/>

    <ImageView
        android:id="@+id/iv_preview"
        style="@style/TakePhoto.ImageView.Thumbnail"/>

    <androidx.constraintlayout.widget.Guideline
        android:id="@+id/gl_mid"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="vertical"
        app:layout_constraintGuide_percent="0.5"/>

    <ImageButton
        android:id="@+id/ib_flash"
        style="@style/Camera.Button.Flash"/>
</androidx.constraintlayout.widget.ConstraintLayout>