call-screen
Version:
Capacitor plugin for full-screen call UI with Accept/Reject buttons, OneSignal integration, and cross-platform support
130 lines (110 loc) • 4.61 kB
text/xml
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="#0F0F23">
<!-- Main content container -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center"
android:padding="40dp">
<!-- Top spacer -->
<View
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="1" />
<!-- Profile picture -->
<RelativeLayout
android:layout_width="120dp"
android:layout_height="120dp"
android:layout_marginBottom="24dp">
<ImageView
android:layout_width="120dp"
android:layout_height="120dp"
android:background="@drawable/profile_circle_bg"
android:scaleType="centerCrop" />
<TextView
android:id="@+id/avatarInitial"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:text="?"
android:textColor="#ffffff"
android:textSize="48sp"
android:textStyle="bold" />
</RelativeLayout>
<!-- Call from text -->
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="You have call from"
android:textColor="#B0B0B0"
android:textSize="16sp"
android:layout_marginBottom="4dp"
android:gravity="center" />
<!-- Caller name -->
<TextView
android:id="@+id/usernameText"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Unknown Caller"
android:textColor="#ffffff"
android:textSize="24sp"
android:textStyle="normal"
android:layout_marginBottom="8dp"
android:maxLines="2"
android:ellipsize="end"
android:gravity="center" />
<!-- Call status -->
<TextView
android:id="@+id/subtitleText"
android:layout_width="106dp"
android:layout_height="6dp"
android:layout_marginBottom="16dp"
android:text="Incoming call 123456..."
android:textColor="#B0B0B0"
android:textSize="16sp" />
<!-- Bottom spacer -->
<View
android:layout_width="match_parent"
android:layout_height="0dp"
android:layout_weight="2" />
<!-- Action buttons -->
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal"
android:gravity="center"
android:layout_marginBottom="80dp">
<!-- Decline button -->
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginEnd="60dp">
<ImageButton
android:id="@+id/rejectButton"
android:layout_width="64dp"
android:layout_height="64dp"
android:background="@drawable/decline_button_bg"
android:src="@drawable/ic_call_end_white"
android:contentDescription="Decline"
android:scaleType="center" />
</RelativeLayout>
<!-- Accept button -->
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ImageButton
android:id="@+id/acceptButton"
android:layout_width="64dp"
android:layout_height="64dp"
android:background="@drawable/accept_button_bg"
android:src="@drawable/ic_call_white"
android:contentDescription="Accept"
android:scaleType="center" />
</RelativeLayout>
</LinearLayout>
</LinearLayout>
</RelativeLayout>