- Added mode toggle button to switch between photo, watermark, and compose modes - Integrated watermark functionality from WatermarkCameraActivity - Integrated simple camera functionality from SimpleCameraActivity - Updated MainActivity to launch CameraActivity directly - Cleaned up AndroidManifest.xml by removing unused activities - Updated layout with mode selection button - All three camera modes now available in single unified interface
86 lines
3.3 KiB
XML
86 lines
3.3 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<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=".CameraActivity">
|
|
|
|
<!-- CameraView for displaying the camera preview -->
|
|
<androidx.camera.view.PreviewView
|
|
android:id="@+id/viewFinder"
|
|
android:layout_width="0dp"
|
|
android:layout_height="0dp"
|
|
app:layout_constraintBottom_toTopOf="@id/controlPanel"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent"
|
|
app:layout_constraintTop_toTopOf="parent" />
|
|
|
|
<!-- Control panel for camera controls -->
|
|
<LinearLayout
|
|
android:id="@+id/controlPanel"
|
|
android:layout_width="0dp"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="vertical"
|
|
android:padding="16dp"
|
|
android:background="@color/white"
|
|
app:layout_constraintBottom_toBottomOf="parent"
|
|
app:layout_constraintEnd_toEndOf="parent"
|
|
app:layout_constraintStart_toStartOf="parent">
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:orientation="horizontal"
|
|
android:gravity="center">
|
|
|
|
<!-- Mode button -->
|
|
<ImageButton
|
|
android:id="@+id/modeButton"
|
|
android:layout_width="48dp"
|
|
android:layout_height="48dp"
|
|
android:layout_margin="16dp"
|
|
android:background="?attr/selectableItemBackgroundBorderless"
|
|
android:src="@drawable/ic_camera"
|
|
android:contentDescription="Change mode" />
|
|
|
|
<!-- Capture button -->
|
|
<ImageButton
|
|
android:id="@+id/captureButton"
|
|
android:layout_width="72dp"
|
|
android:layout_height="72dp"
|
|
android:layout_margin="16dp"
|
|
android:background="@drawable/circle_button_background"
|
|
android:src="@drawable/ic_camera"
|
|
android:contentDescription="Capture photo" />
|
|
|
|
<!-- Settings button -->
|
|
<ImageButton
|
|
android:id="@+id/settingsButton"
|
|
android:layout_width="48dp"
|
|
android:layout_height="48dp"
|
|
android:layout_margin="16dp"
|
|
android:background="?attr/selectableItemBackgroundBorderless"
|
|
android:src="@drawable/ic_settings"
|
|
android:contentDescription="Settings" />
|
|
|
|
</LinearLayout>
|
|
|
|
<!-- Preview of captured photos -->
|
|
<HorizontalScrollView
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_marginTop="8dp">
|
|
|
|
<LinearLayout
|
|
android:id="@+id/photoPreviewLayout"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="match_parent"
|
|
android:orientation="horizontal" />
|
|
|
|
</HorizontalScrollView>
|
|
|
|
</LinearLayout>
|
|
|
|
</androidx.constraintlayout.widget.ConstraintLayout> |