Skip to content

Instantly share code, notes, and snippets.

@ibrajix
Created August 10, 2021 11:59
Show Gist options
  • Save ibrajix/829f110456df17f8bbf9f74ab9f1a6c4 to your computer and use it in GitHub Desktop.
Save ibrajix/829f110456df17f8bbf9f74ab9f1a6c4 to your computer and use it in GitHub Desktop.
Camera Fragment Layout
<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"
tools:context=".ui.fragments.CameraFragment">
<ImageView
android:id="@+id/imageView29"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:layout_marginTop="10dp"
android:elevation="2dp"
android:src="@drawable/ic_profile_pic_round_transparent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
<ImageView
android:id="@+id/imageView30"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="10dp"
android:elevation="2dp"
android:src="@drawable/ic_search_round_transparent"
app:layout_constraintBottom_toBottomOf="@+id/imageView29"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toEndOf="@+id/imageView29"
app:layout_constraintTop_toTopOf="@+id/imageView29"
app:layout_constraintVertical_bias="0.0" />
<ImageView
android:id="@+id/imageView31"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:elevation="2dp"
android:layout_marginEnd="10dp"
android:src="@drawable/ic_add_friend_round_transparent"
app:layout_constraintEnd_toStartOf="@+id/img_switch_camera"
app:layout_constraintTop_toTopOf="@+id/imageView30" />
<ImageView
android:id="@+id/img_switch_camera"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:elevation="2dp"
android:layout_marginEnd="10dp"
android:src="@drawable/ic_camera_switch_round_transparent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="@+id/imageView31" />
<Button
android:id="@+id/camera_capture_button"
android:layout_width="80dp"
android:layout_height="80dp"
android:layout_marginBottom="20dp"
android:background="@drawable/btn_round"
android:elevation="2dp"
android:scaleType="fitCenter"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toRightOf="parent" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:elevation="2dp"
android:layout_marginEnd="20dp"
android:src="@drawable/ic_gallery_round_transparent"
app:layout_constraintBottom_toBottomOf="@+id/camera_capture_button"
app:layout_constraintEnd_toStartOf="@+id/camera_capture_button"
app:layout_constraintHorizontal_bias="1.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="@+id/camera_capture_button" />
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:elevation="2dp"
android:layout_marginStart="20dp"
android:src="@drawable/ic_filter_smile_round_transparent"
app:layout_constraintBottom_toBottomOf="@+id/camera_capture_button"
app:layout_constraintStart_toEndOf="@+id/camera_capture_button"
app:layout_constraintTop_toTopOf="@+id/camera_capture_button" />
<androidx.camera.view.PreviewView
android:id="@+id/viewFinder"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</androidx.constraintlayout.widget.ConstraintLayout>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment