blob: 44ab682ba62124f569fa1ac6d90820abf8375e72 [file] [log] [blame]
<?xml version="1.0" encoding="utf-8"?><!--
Copyright (C) 2004-2016 Savoir-faire Linux Inc.
Author: Adrien Beraud <adrien.beraud@savoirfairelinux.com>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
-->
<FrameLayout 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"
android:keepScreenOn="true"
tools:context=".client.CallActivity">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<SurfaceView
android:id="@+id/video_preview_surface"
android:layout_width="match_parent"
android:layout_height="32dp"
android:layout_centerInParent="true"
android:layout_gravity="center"
android:visibility="gone"
tools:visibility="visible" />
<SurfaceView
android:id="@+id/camera_preview_surface"
android:layout_width="160dp"
android:layout_height="120dp"
android:layout_alignParentEnd="true"
android:layout_alignParentBottom="true"
android:layout_margin="12dp"
android:visibility="gone"
tools:visibility="visible" />
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:clipToPadding="false"
android:fitsSystemWindows="true"
android:animateLayoutChanges="true">
<LinearLayout
android:id="@+id/contact_bubble_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_centerInParent="true"
android:gravity="center"
android:orientation="vertical"
android:visibility="invisible">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="230dp">
<com.rodolfonavalon.shaperipplelibrary.ShapeRipple
android:id="@+id/shape_ripple"
android:layout_width="match_parent"
android:layout_height="match_parent"
app:enable_color_transition="true"
app:ripple_color="@color/white"
app:ripple_count="3"
app:ripple_duration="5000"
app:ripple_stroke_width="15dp" />
<ImageView
android:id="@+id/contact_bubble"
android:layout_width="160dp"
android:layout_height="160dp"
android:layout_centerInParent="true"
tools:src="@drawable/ic_contact_picture_fallback" />
</RelativeLayout>
<TextView
android:id="@+id/contact_bubble_txt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="middle"
android:gravity="center_horizontal"
android:paddingStart="32dp"
android:paddingEnd="32dp"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="@color/text_color_primary_dark"
tools:text="Contact Name" />
<TextView
android:id="@+id/contact_bubble_num_txt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:ellipsize="middle"
android:gravity="center_horizontal"
android:paddingStart="32dp"
android:paddingEnd="32dp"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceMedium"
android:textColor="@color/text_color_secondary_dark"
android:visibility="gone"
tools:text="ring:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
tools:visibility="visible" />
<TextView
android:id="@+id/call_status_txt"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center_horizontal"
android:paddingStart="32dp"
android:paddingEnd="32dp"
android:textColor="@color/text_color_primary_dark"
android:textSize="16sp"
tools:text="Connecting" />
</LinearLayout>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@+id/contact_bubble_layout"
android:layout_centerHorizontal="true"
android:orientation="horizontal"
tools:visibility="gone">
<android.support.design.widget.FloatingActionButton
android:id="@+id/call_refuse_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:contentDescription="@string/action_call_decline"
app:backgroundTint="@color/error_red"
app:elevation="6dp"
app:fabSize="normal"
app:pressedTranslationZ="12dp"
app:rippleColor="@android:color/white"
app:srcCompat="@drawable/ic_call_end_white"
app:useCompatPadding="true" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/call_accept_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="16dp"
android:contentDescription="@string/action_call_accept"
app:backgroundTint="#4caf50"
app:elevation="6dp"
app:fabSize="normal"
app:pressedTranslationZ="12dp"
app:rippleColor="@android:color/white"
app:srcCompat="@drawable/ic_call_white"
app:useCompatPadding="true" />
</LinearLayout>
<LinearLayout
android:id="@+id/call_control_group"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentStart="true"
android:layout_alignParentBottom="true"
android:layout_marginStart="16dp"
android:layout_marginBottom="16dp"
android:gravity="center"
android:orientation="vertical"
android:visibility="gone"
tools:visibility="visible">
<ImageButton
android:id="@+id/call_camera_flip_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="12dp"
android:background="@drawable/call_button_background"
android:contentDescription="@string/ab_action_flipcamera"
android:padding="16dp"
android:tint="@color/white"
app:srcCompat="@drawable/ic_camera_front_white" />
<cx.ring.views.CheckableImageButton
android:id="@+id/call_mic_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="12dp"
android:background="@drawable/call_button_background"
android:contentDescription="Mute microphone"
android:padding="16dp"
android:tint="@color/white"
app:srcCompat="@drawable/baseline_mic_off_24"
tools:visibility="visible" />
<cx.ring.views.CheckableImageButton
android:id="@+id/call_speaker_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="12dp"
android:background="@drawable/call_button_background"
android:contentDescription="@string/ab_action_speakerphone"
android:padding="16dp"
android:tint="@color/white"
app:srcCompat="@drawable/baseline_volume_up_24" />
</LinearLayout>
<EditText
android:id="@+id/dialpad_edit_text"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:ems="10"
android:inputType="phone"
android:visibility="visible" />
<android.support.design.widget.FloatingActionButton
android:id="@+id/call_hangup_btn"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_centerHorizontal="true"
android:layout_marginBottom="4dp"
android:contentDescription="@string/action_call_hangup"
app:backgroundTint="@color/error_red"
app:elevation="6dp"
app:fabSize="normal"
app:pressedTranslationZ="12dp"
app:rippleColor="@android:color/white"
app:srcCompat="@drawable/ic_call_end_white"
app:useCompatPadding="true" />
</RelativeLayout>
</FrameLayout>