mirror of
https://github.com/oxen-io/session-android.git
synced 2024-11-30 21:45:20 +00:00
1abf39685a
Closes #4971 Fixes #4245 // FREEBIE
166 lines
7.9 KiB
XML
166 lines
7.9 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- Copyright (C) 2007 The Android Open Source Project
|
|
|
|
Licensed under the Apache License, Version 2.0 (the "License");
|
|
you may not use this file except in compliance with the License.
|
|
You may obtain a copy of the License at
|
|
|
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
Unless required by applicable law or agreed to in writing, software
|
|
distributed under the License is distributed on an "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
See the License for the specific language governing permissions and
|
|
limitations under the License.
|
|
-->
|
|
|
|
<!-- XML resource file for the *children* of a CallCard used in the Phone app.
|
|
The CallCard itself is a subclass of FrameLayout, and its (single)
|
|
child is the LinearLayout found here. (In the CallCard constructor,
|
|
we inflate this file and add it as a child.)
|
|
|
|
Note that the CallCard is technically the size of the full screen (since
|
|
our parent container is full-screen, and the layout_width and layout_height
|
|
here are both "match_parent"), but we manually adjust its bottom margin
|
|
in CallCard.updateCallInfoLayout() to make sure it doesn't overlap with
|
|
the onscreen buttons from incall_touch_ui.xml. -->
|
|
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
|
android:id="@+id/call_info_container"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:orientation="vertical"
|
|
>
|
|
|
|
<!-- "Call info" block #1, for the foreground call. -->
|
|
<RelativeLayout android:id="@+id/call_info_1"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="0dp"
|
|
android:layout_weight="1"
|
|
>
|
|
|
|
<!-- Contact photo for call_info_1 -->
|
|
<ImageView android:id="@+id/photo"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="match_parent"
|
|
android:layout_below="@+id/call_banner_1"
|
|
android:layout_marginBottom="@dimen/in_call_button_height"
|
|
android:gravity="top|center_horizontal"
|
|
android:background="@android:color/black"
|
|
android:scaleType="centerCrop"
|
|
/>
|
|
|
|
<!-- "Call Banner" for call #1, the foregound or ringing call.
|
|
The "call banner" is a block of info about a single call,
|
|
including the contact name, phone number, call time counter,
|
|
and other status info. This info is shown as a "banner"
|
|
overlaid across the top of contact photo. -->
|
|
<RelativeLayout android:id="@+id/call_banner_1"
|
|
android:layout_alignParentTop="true"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:minHeight="80dp"
|
|
android:paddingLeft="24dp"
|
|
android:paddingRight="24dp"
|
|
android:paddingTop="16dp"
|
|
android:paddingBottom="16dp"
|
|
android:background="@color/textsecure_primary"
|
|
>
|
|
|
|
<!-- Name (or the phone number, if we don't have a name to display). -->
|
|
<TextView android:id="@+id/name"
|
|
android:layout_alignParentTop="true"
|
|
android:layout_alignParentLeft="true"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:paddingRight="50sp"
|
|
android:textAppearance="?android:attr/textAppearanceMedium"
|
|
android:textColor="#FFFFFF"
|
|
android:singleLine="true"
|
|
/>
|
|
|
|
<!-- Label (like "Mobile" or "Work", if present) and phone number, side by side -->
|
|
<LinearLayout android:id="@+id/labelAndNumber"
|
|
android:layout_below="@id/name"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:paddingRight="50sp"
|
|
android:orientation="horizontal"
|
|
>
|
|
<TextView android:id="@+id/phoneNumber"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
|
android:textColor="#FFFFFF"
|
|
android:singleLine="true"
|
|
/>
|
|
<TextView android:id="@+id/label"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
|
android:textColor="#FFFFFF"
|
|
android:textAllCaps="true"
|
|
android:singleLine="true"
|
|
android:layout_marginLeft="6dip"
|
|
/>
|
|
</LinearLayout>
|
|
|
|
<!-- Elapsed time indication for a call in progress. -->
|
|
<TextView android:id="@+id/elapsedTime"
|
|
android:layout_alignParentRight="true"
|
|
android:layout_centerVertical="true"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:textAppearance="?android:attr/textAppearanceMedium"
|
|
android:textColor="#FFFFFF"
|
|
android:singleLine="true"
|
|
/>
|
|
|
|
<!-- Call type indication: a special label and/or branding
|
|
for certain kinds of calls (like "Internet call" for a SIP call.) -->
|
|
<TextView android:id="@+id/callTypeLabel"
|
|
android:layout_below="@id/labelAndNumber"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
|
android:textColor="#FFFFFF"
|
|
android:maxLines="1"
|
|
android:ellipsize="end"
|
|
android:visibility="visible"
|
|
android:text="@string/redphone_call_card__signal_call"
|
|
/>
|
|
|
|
<!-- Social status (currently unused) -->
|
|
<TextView android:id="@+id/socialStatus"
|
|
android:layout_below="@id/callTypeLabel"
|
|
android:layout_width="wrap_content"
|
|
android:layout_height="wrap_content"
|
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
|
android:textColor="#FFFFFF"
|
|
android:maxLines="2"
|
|
android:ellipsize="end"
|
|
/>
|
|
|
|
</RelativeLayout> <!-- End of call_banner for call_info #1. -->
|
|
|
|
<!-- The "call state label": In some states, this shows a special
|
|
indication like "Dialing" or "Incoming call" or "Call ended".
|
|
It's unused for the normal case of an active ongoing call. -->
|
|
<!-- This is visually part of the call banner, but it's not actually
|
|
part of the "call_banner_1" RelativeLayout since it needs a
|
|
different background color. -->
|
|
<TextView android:id="@+id/callStateLabel"
|
|
android:layout_width="match_parent"
|
|
android:layout_height="wrap_content"
|
|
android:layout_below="@id/call_banner_1"
|
|
android:gravity="right"
|
|
android:paddingTop="8dp"
|
|
android:paddingBottom="8dp"
|
|
android:paddingRight="24dp"
|
|
android:textAppearance="?android:attr/textAppearanceSmall"
|
|
android:textColor="#FFFFFF"
|
|
android:textAllCaps="true"
|
|
android:background="#8033b5e5"
|
|
/>
|
|
</RelativeLayout>
|
|
</LinearLayout>
|