AnimalRating/app/src/main/res/layout/activity_main.xml

54 lines
1.9 KiB
XML

<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">
<androidx.camera.view.PreviewView
android:id="@+id/cameraPreview"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<com.example.animalrating.ui.SilhouetteOverlay
android:id="@+id/silhouetteOverlay"
android:layout_width="match_parent"
android:layout_height="match_parent" />
<!-- ImageView to display the saved mask (Green) -->
<ImageView
android:id="@+id/savedMaskOverlay"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:elevation="5dp"/>
<!-- ImageView to display the segmentation mask (Live) -->
<ImageView
android:id="@+id/segmentationOverlay"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:scaleType="centerCrop"
android:alpha="0.9"
android:elevation="10dp"/>
<com.google.android.material.button.MaterialButton
android:id="@+id/btnExit"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_gravity="top|start"
android:layout_margin="16dp"
style="@style/Widget.MaterialComponents.Button.Icon"
app:icon="@drawable/ic_back_arrow"
app:iconSize="24dp"
app:iconTint="#FFFFFF"
app:backgroundTint="#80000000"
app:cornerRadius="24dp"
android:padding="0dp"
android:insetLeft="0dp"
android:insetTop="0dp"
android:insetRight="0dp"
android:insetBottom="0dp"
app:iconGravity="textStart"
app:iconPadding="0dp"
android:gravity="center"/>
</FrameLayout>