fix: sử dụng AI để nhận diện khuôn mặt và focus
This commit is contained in:
@@ -93,6 +93,15 @@
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<!-- Lớp đè AI: Hiển thị kết quả tách nền thời gian thực -->
|
||||
<ImageView
|
||||
android:id="@+id/imgAiPreviewOverlay"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:scaleType="fitCenter"
|
||||
android:visibility="gone"
|
||||
android:contentDescription="AI Preview Overlay" />
|
||||
|
||||
<!-- Lớp đè lọc màu (Filter Overlay): Hiển thị màu Preset cổ điển -->
|
||||
<ImageView
|
||||
android:id="@+id/imgFilterOverlay"
|
||||
@@ -110,6 +119,14 @@
|
||||
android:scaleType="fitCenter"
|
||||
android:contentDescription="Frame Overlay" />
|
||||
|
||||
<!-- Lớp chớp sáng màn hình khi chụp (Flash Effect) -->
|
||||
<View
|
||||
android:id="@+id/viewShutterFlash"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="#FFFFFF"
|
||||
android:visibility="gone" />
|
||||
|
||||
<!-- Số đếm ngược khi hẹn giờ chụp -->
|
||||
<TextView
|
||||
android:id="@+id/txtTimerCountdown"
|
||||
@@ -138,7 +155,7 @@
|
||||
app:layout_constraintTop_toBottomOf="@id/cameraContainer"
|
||||
app:layout_constraintBottom_toTopOf="@id/bottomControlPanel">
|
||||
|
||||
<!-- Danh sách cuộn ngang -->
|
||||
<!-- Danh sách cuộn ngang (Frames / Presets) -->
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rvHorizontalTimeline"
|
||||
android:layout_width="match_parent"
|
||||
@@ -150,6 +167,56 @@
|
||||
android:paddingEnd="16dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<!-- Danh sách lựa chọn phông nền AI (Thay thế nền) -->
|
||||
<androidx.recyclerview.widget.RecyclerView
|
||||
android:id="@+id/rvBackgroundOptions"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:orientation="horizontal"
|
||||
android:clipToPadding="false"
|
||||
android:paddingStart="75dp"
|
||||
android:paddingEnd="16dp"
|
||||
android:visibility="gone" />
|
||||
|
||||
<!-- Thước đo Ruler cho Portrait Blur (Xóa nền) -->
|
||||
<FrameLayout
|
||||
android:id="@+id/panelRulerContainer"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="50dp"
|
||||
android:layout_gravity="center_vertical"
|
||||
android:layout_marginStart="75dp"
|
||||
android:visibility="gone">
|
||||
|
||||
<com.photobooth.app.RulerView
|
||||
android:id="@+id/panelRulerView"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
||||
<LinearLayout
|
||||
android:id="@+id/layoutPanelRulerPointer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
android:layout_gravity="center">
|
||||
<TextView
|
||||
android:id="@+id/tvPanelRulerValue"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="0"
|
||||
android:textColor="#FF9800"
|
||||
android:textSize="12sp"
|
||||
android:textStyle="bold"
|
||||
android:layout_gravity="center_horizontal"/>
|
||||
<ImageView
|
||||
android:layout_width="12dp"
|
||||
android:layout_height="12dp"
|
||||
android:src="@drawable/ic_arrow_down_orange"
|
||||
android:layout_gravity="center_horizontal"
|
||||
android:contentDescription="Indicator" />
|
||||
</LinearLayout>
|
||||
</FrameLayout>
|
||||
|
||||
<!-- Khung nền đen che các item cuộn sang bên trái -->
|
||||
<View
|
||||
android:id="@+id/viewLeftDockBackground"
|
||||
@@ -158,7 +225,7 @@
|
||||
android:background="#000000"
|
||||
android:visibility="gone" />
|
||||
|
||||
<!-- LỚP TRÊN: Chứa 2 nút chức năng chính (Gốc ở giữa, động chuyển sang trái) -->
|
||||
<!-- LỚP TRÊN: Chứa 4 nút chức năng chính (Gốc ở giữa, động chuyển sang trái) -->
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
android:id="@+id/buttonsWrapper"
|
||||
android:layout_width="match_parent"
|
||||
@@ -176,7 +243,7 @@
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/btnMainPreset"
|
||||
app:layout_constraintHorizontal_chainStyle="packed"
|
||||
android:layout_marginEnd="16dp"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:contentDescription="Frame Selector" />
|
||||
|
||||
<!-- Nút Presets Màu -->
|
||||
@@ -189,8 +256,36 @@
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/btnMainFrame"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintEnd_toStartOf="@id/btnMainPortraitBlur"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:contentDescription="Preset Color Selector" />
|
||||
|
||||
<!-- Nút Xóa nền (Portrait Blur) -->
|
||||
<ImageView
|
||||
android:id="@+id/btnMainPortraitBlur"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:src="@drawable/ic_attr_portrait_blur"
|
||||
android:background="@android:color/transparent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/btnMainPreset"
|
||||
app:layout_constraintEnd_toStartOf="@id/btnMainBgReplace"
|
||||
android:layout_marginEnd="12dp"
|
||||
android:contentDescription="Portrait Blur Selector" />
|
||||
|
||||
<!-- Nút Thay nền (BG Replace) -->
|
||||
<ImageView
|
||||
android:id="@+id/btnMainBgReplace"
|
||||
android:layout_width="50dp"
|
||||
android:layout_height="50dp"
|
||||
android:src="@drawable/ic_attr_bg_replace"
|
||||
android:background="@android:color/transparent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@id/btnMainPortraitBlur"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
android:contentDescription="Background Replace Selector" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||
</FrameLayout>
|
||||
@@ -298,6 +393,7 @@
|
||||
|
||||
<!-- Kim chỉ số 0 màu cam chính giữa cố định -->
|
||||
<LinearLayout
|
||||
android:id="@+id/layoutRulerPointer"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:orientation="vertical"
|
||||
|
||||
Reference in New Issue
Block a user