mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-04-23 11:38:30 +00:00
275 lines
No EOL
12 KiB
XML
275 lines
No EOL
12 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<layout 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"
|
|
xmlns:bind="http://schemas.android.com/tools">
|
|
|
|
<data>
|
|
<import type="android.view.View" />
|
|
<variable
|
|
name="viewModel"
|
|
type="org.linphone.activities.call.viewmodels.CallsViewModel" />
|
|
<variable
|
|
name="controlsViewModel"
|
|
type="org.linphone.activities.call.viewmodels.ControlsViewModel" />
|
|
</data>
|
|
|
|
<RelativeLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent">
|
|
|
|
<View
|
|
android:visibility="@{controlsViewModel.isVideoEnabled ? View.GONE : View.VISIBLE}"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:background="?attr/backgroundColor"/>
|
|
|
|
<LinearLayout
|
|
android:id="@+id/active_call_header"
|
|
android:visibility="@{viewModel.currentCallViewModel == null ? View.GONE : View.VISIBLE}"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_alignParentTop="true"
|
|
android:layout_centerHorizontal="true"
|
|
android:background="?attr/backgroundColor"
|
|
android:alpha="0.8"
|
|
android:orientation="vertical">
|
|
|
|
<TextView
|
|
android:text="@{viewModel.currentCallViewModel.contact.fullName ?? viewModel.currentCallViewModel.displayName ?? null}"
|
|
style="@style/big_contact_name_font"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:gravity="center"
|
|
android:paddingTop="5dp" />
|
|
|
|
<Chronometer
|
|
android:id="@+id/active_call_timer"
|
|
style="@style/sip_uri_font"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center" />
|
|
|
|
</LinearLayout>
|
|
|
|
<LinearLayout
|
|
android:visibility="@{viewModel.conferenceCalls.size() == 0 || viewModel.isConferencePaused ? View.GONE : View.VISIBLE, default=gone}"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_alignParentTop="true"
|
|
android:layout_centerHorizontal="true"
|
|
android:background="?attr/backgroundColor"
|
|
android:orientation="vertical">
|
|
|
|
<RelativeLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="60dp">
|
|
|
|
<TextView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_centerVertical="true"
|
|
android:paddingLeft="10dp"
|
|
android:textColor="?attr/primaryTextColor"
|
|
android:textSize="30sp"
|
|
android:text="@string/call_conference_title" />
|
|
|
|
<ImageView
|
|
android:onClick="@{() -> controlsViewModel.switchCamera()}"
|
|
android:visibility="@{controlsViewModel.isVideoEnabled ? View.VISIBLE : View.GONE, default=gone}"
|
|
android:contentDescription="@string/content_description_switch_camera"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="match_parent"
|
|
android:layout_toLeftOf="@id/pause_conference"
|
|
android:adjustViewBounds="true"
|
|
android:padding="10dp"
|
|
android:scaleType="fitCenter"
|
|
android:src="@drawable/switch_camera" />
|
|
|
|
<ImageView
|
|
android:id="@+id/pause_conference"
|
|
android:onClick="@{() -> viewModel.pauseConference()}"
|
|
android:contentDescription="@string/content_description_pause_conference"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="match_parent"
|
|
android:layout_alignParentRight="true"
|
|
android:layout_centerVertical="true"
|
|
android:adjustViewBounds="true"
|
|
android:padding="10dp"
|
|
android:scaleType="fitCenter"
|
|
android:src="@drawable/pause" />
|
|
|
|
</RelativeLayout>
|
|
|
|
<View
|
|
android:layout_width="match_parent"
|
|
android:layout_height="1dp"
|
|
android:background="?attr/dividerColor" />
|
|
|
|
<LinearLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="top"
|
|
android:orientation="vertical"
|
|
app:entries="@{viewModel.conferenceCalls}"
|
|
app:layout="@{@layout/call_conference_cell}"/>
|
|
|
|
</LinearLayout>
|
|
|
|
<org.linphone.contact.BigContactAvatarView
|
|
android:visibility="@{controlsViewModel.isVideoEnabled ? View.GONE : View.VISIBLE, default=gone}"
|
|
android:id="@+id/avatar"
|
|
android:layout_width="200dp"
|
|
android:layout_height="200dp"
|
|
android:layout_centerInParent="true"
|
|
android:layout_margin="5dp"
|
|
android:gravity="center"
|
|
tools:layout="@layout/contact_avatar_big"
|
|
app:viewModel="@{viewModel.currentCallViewModel}"/>
|
|
|
|
<LinearLayout
|
|
android:visibility="@{viewModel.callPausedByRemote ? View.VISIBLE : View.GONE, default=gone}"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:alpha="0.9"
|
|
android:background="@color/dark_grey_color"
|
|
android:gravity="center"
|
|
android:orientation="vertical">
|
|
|
|
<ImageView
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:contentDescription="@string/content_description_on_pause"
|
|
android:src="@drawable/waiting_time" />
|
|
|
|
<TextView
|
|
android:textColor="?attr/secondaryTextColor"
|
|
android:textSize="15sp"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:layout_gravity="center"
|
|
android:text="@string/call_paused_by_remote" />
|
|
|
|
</LinearLayout>
|
|
|
|
<LinearLayout
|
|
android:id="@+id/paused_calls"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_above="@id/primary_buttons_row"
|
|
android:layout_marginBottom="60dp"
|
|
android:layout_gravity="bottom"
|
|
android:background="?attr/backgroundColor"
|
|
android:orientation="vertical"
|
|
app:entries="@{viewModel.pausedCalls}"
|
|
app:layout="@{@layout/call_paused_cell}" />
|
|
|
|
<LinearLayout
|
|
android:visibility="@{viewModel.isConferencePaused && viewModel.conferenceCalls.size() > 0 ? View.VISIBLE : View.GONE, default=gone}"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="50dp"
|
|
android:layout_above="@id/paused_calls"
|
|
android:alpha="0.5"
|
|
android:background="?attr/accentColor"
|
|
android:gravity="center_vertical"
|
|
android:orientation="horizontal"
|
|
android:padding="5dp">
|
|
|
|
<ImageView
|
|
android:layout_width="40dp"
|
|
android:layout_height="40dp"
|
|
android:contentDescription="@string/content_description_start_conference"
|
|
android:src="@drawable/options_start_conference" />
|
|
|
|
<TextView
|
|
android:layout_width="0dip"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:gravity="center_vertical|left"
|
|
android:singleLine="true"
|
|
android:ellipsize="end"
|
|
android:paddingLeft="20dp"
|
|
android:paddingRight="10dp"
|
|
android:textColor="?attr/secondaryTextColor"
|
|
android:textSize="15sp"
|
|
android:text="@string/call_conference_title" />
|
|
|
|
<ImageView
|
|
android:onClick="@{() -> viewModel.resumeConference()}"
|
|
android:layout_width="40dp"
|
|
android:layout_height="40dp"
|
|
android:gravity="center_vertical"
|
|
android:contentDescription="@string/content_description_resume_conference"
|
|
android:src="@drawable/pause" />
|
|
|
|
</LinearLayout>
|
|
|
|
<ImageView
|
|
android:onClick="@{() -> viewModel.currentCallViewModel.pause()}"
|
|
android:visibility="@{viewModel.currentCallViewModel == null ? View.GONE : View.VISIBLE}"
|
|
android:selected="@{viewModel.currentCallViewModel.isPaused ?? false}"
|
|
android:enabled="@{!viewModel.callPausedByRemote && controlsViewModel.isPauseEnabled}"
|
|
android:contentDescription="@string/content_description_pause_call"
|
|
android:layout_width="50dp"
|
|
android:layout_height="50dp"
|
|
android:layout_below="@id/active_call_header"
|
|
android:layout_alignParentRight="true"
|
|
android:layout_margin="20dp"
|
|
android:src="@drawable/pause" />
|
|
|
|
<ImageView
|
|
android:onClick="@{() -> controlsViewModel.switchCamera()}"
|
|
android:enabled="@{!viewModel.callPausedByRemote}"
|
|
android:visibility="@{controlsViewModel.isVideoEnabled && controlsViewModel.showSwitchCamera && (viewModel.conferenceCalls.size() == 0 || viewModel.isConferencePaused) ? View.VISIBLE : View.GONE, default=gone}"
|
|
android:contentDescription="@string/content_description_switch_camera"
|
|
android:layout_width="50dp"
|
|
android:layout_height="50dp"
|
|
android:layout_below="@id/active_call_header"
|
|
android:layout_alignParentLeft="true"
|
|
android:layout_margin="20dp"
|
|
android:src="@drawable/switch_camera" />
|
|
|
|
<ImageView
|
|
android:onClick="@{() -> controlsViewModel.toggleRecording(false)}"
|
|
android:visibility="@{controlsViewModel.isRecording ? View.VISIBLE : View.GONE, default=gone}"
|
|
android:contentDescription="@string/content_description_toggle_recording"
|
|
android:layout_width="50dp"
|
|
android:layout_height="50dp"
|
|
android:layout_alignParentLeft="true"
|
|
android:layout_above="@id/primary_buttons_row"
|
|
android:layout_marginBottom="80dp"
|
|
android:layout_marginLeft="20dp"
|
|
android:background="@drawable/round_orange_button_background"
|
|
android:padding="10dp"
|
|
android:src="@drawable/options_rec" />
|
|
|
|
<include
|
|
android:id="@+id/primary_buttons_row"
|
|
layout="@layout/call_primary_buttons"
|
|
bind:viewModel="@{controlsViewModel}"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="60dp"
|
|
android:layout_alignParentBottom="true"/>
|
|
|
|
<include
|
|
layout="@layout/numpad"
|
|
android:visibility="@{controlsViewModel.numpadVisibility ? View.VISIBLE : View.GONE, default=gone}"
|
|
bind:keyListener="@{controlsViewModel.onKeyClick}"
|
|
android:layout_above="@id/primary_buttons_row"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:layout_marginBottom="60dp"
|
|
android:layout_centerInParent="true" />
|
|
|
|
<include
|
|
layout="@layout/call_secondary_buttons"
|
|
bind:viewModel="@{controlsViewModel}"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:layout_above="@id/primary_buttons_row" />
|
|
|
|
</RelativeLayout>
|
|
|
|
</layout> |