mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-02-04 05:09:33 +00:00
143 lines
6 KiB
XML
143 lines
6 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">
|
|
|
|
<data>
|
|
<import type="android.view.View"/>
|
|
<variable
|
|
name="eraseClickListener"
|
|
type="android.view.View.OnClickListener"/>
|
|
<variable
|
|
name="eraseLongClickListener"
|
|
type="android.view.View.OnLongClickListener"/>
|
|
<variable
|
|
name="newContactClickListener"
|
|
type="android.view.View.OnClickListener"/>
|
|
<variable
|
|
name="startCallClickListener"
|
|
type="android.view.View.OnClickListener"/>
|
|
<variable
|
|
name="addCallClickListener"
|
|
type="android.view.View.OnClickListener"/>
|
|
<variable
|
|
name="transferCallClickListener"
|
|
type="android.view.View.OnClickListener"/>
|
|
<variable
|
|
name="viewModel"
|
|
type="org.linphone.activities.main.dialer.viewmodels.DialerViewModel"/>
|
|
</data>
|
|
|
|
<RelativeLayout
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent">
|
|
|
|
<androidx.fragment.app.FragmentContainerView
|
|
android:id="@+id/tabs_fragment"
|
|
android:name="org.linphone.activities.main.fragments.TabsFragment"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="60dp"
|
|
android:layout_alignParentBottom="true"
|
|
tools:layout="@layout/tabs_fragment" />
|
|
|
|
<RelativeLayout
|
|
android:id="@+id/address_bar"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="60dp"
|
|
android:layout_alignParentTop="true"
|
|
android:background="?attr/lightToolbarBackgroundColor">
|
|
|
|
<ImageView
|
|
android:id="@+id/erase"
|
|
android:onClick="@{eraseClickListener}"
|
|
android:onLongClick="@{eraseLongClickListener}"
|
|
android:contentDescription="@string/content_description_dialer_erase"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="match_parent"
|
|
android:paddingLeft="10dp"
|
|
android:paddingRight="10dp"
|
|
android:layout_alignParentRight="true"
|
|
android:layout_centerVertical="true"
|
|
android:focusableInTouchMode="true"
|
|
android:src="@drawable/backspace" />
|
|
|
|
<EditText
|
|
android:text="@={viewModel.enteredUri}"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:layout_centerVertical="true"
|
|
android:layout_toLeftOf="@id/erase"
|
|
android:background="@color/transparent_color"
|
|
android:backgroundTint="@color/transparent_color"
|
|
android:ellipsize="start"
|
|
android:hint="@string/dialer_address_bar_hint"
|
|
android:inputType="textEmailAddress"
|
|
android:paddingLeft="20dp"
|
|
android:paddingRight="5dp"
|
|
android:textColorHint="@color/light_grey_color" />
|
|
|
|
</RelativeLayout>
|
|
|
|
<LinearLayout
|
|
android:id="@+id/controls"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="60dp"
|
|
android:layout_above="@id/tabs_fragment">
|
|
|
|
<ImageView
|
|
android:onClick="@{newContactClickListener}"
|
|
android:enabled="@{viewModel.enteredUri.length() > 0}"
|
|
android:contentDescription="@string/content_description_add_contact"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="2"
|
|
android:background="?attr/button_background_drawable"
|
|
android:padding="15dp"
|
|
android:src="@drawable/contact_add" />
|
|
|
|
<ImageView
|
|
android:onClick="@{startCallClickListener}"
|
|
android:visibility="@{viewModel.atLeastOneCall ? View.GONE : View.VISIBLE}"
|
|
android:contentDescription="@string/content_description_start_call"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:background="@drawable/call"
|
|
android:padding="12dp"
|
|
android:src="@drawable/call_audio_start" />
|
|
|
|
<ImageView
|
|
android:onClick="@{addCallClickListener}"
|
|
android:visibility="@{viewModel.atLeastOneCall && !viewModel.transferVisibility ? View.VISIBLE : View.GONE, default=gone}"
|
|
android:contentDescription="@string/content_description_add_call"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:background="@drawable/call"
|
|
android:padding="12dp"
|
|
android:src="@drawable/call_add" />
|
|
|
|
<ImageView
|
|
android:onClick="@{transferCallClickListener}"
|
|
android:visibility="@{viewModel.atLeastOneCall && viewModel.transferVisibility ? View.VISIBLE : View.GONE, default=gone}"
|
|
android:contentDescription="@string/content_description_transfer_call"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_weight="1"
|
|
android:background="@drawable/call"
|
|
android:padding="12dp"
|
|
android:src="@drawable/call_transfer" />
|
|
|
|
</LinearLayout>
|
|
|
|
<include
|
|
layout="@layout/numpad"
|
|
android:layout_above="@id/controls"
|
|
android:layout_below="@id/address_bar"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
app:keyListener="@{viewModel.onKeyClick}" />
|
|
|
|
</RelativeLayout>
|
|
|
|
</layout>
|