Replace answer/decline button and action for incoming calls

Fixes #7199
This commit is contained in:
Moxie Marlinspike
2017-11-19 16:24:30 -08:00
parent e14a97cf68
commit 86bd2351bc
17 changed files with 422 additions and 1773 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 259 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 301 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 371 B

View File

@@ -0,0 +1,79 @@
<?xml version="1.0" encoding="utf-8"?>
<merge xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:clipToPadding="false"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
tools:parentTag="android.widget.LinearLayout"
tools:orientation="vertical">
<ImageView android:id="@+id/arrow_one"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="-15dp"
android:alpha="0"
android:src="@drawable/ic_keyboard_arrow_up_white_36dp"
android:tint="@color/gray20"
tools:alpha="1"/>
<ImageView android:id="@+id/arrow_two"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="-15dp"
android:alpha="0"
android:src="@drawable/ic_keyboard_arrow_up_white_36dp"
android:tint="@color/gray20"
tools:alpha="1"/>
<ImageView android:id="@+id/arrow_three"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="-15dp"
android:alpha="0"
android:src="@drawable/ic_keyboard_arrow_up_white_36dp"
android:tint="@color/gray20"
tools:alpha="1"/>
<ImageView android:id="@+id/arrow_four"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="10dp"
android:alpha="0"
android:src="@drawable/ic_keyboard_arrow_up_white_36dp"
android:tint="@color/gray20"
tools:alpha="1"/>
<TextView android:id="@+id/swipe_up_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginBottom="19dp"
android:textColor="@color/gray20"
android:textStyle="italic"
android:text="@string/webrtc_answer_decline_button__swipe_up_to_answer"/>
<ImageView android:id="@+id/answer"
android:layout_width="56dp"
android:layout_height="56dp"
android:layout_gravity="center_horizontal"
android:padding="12dp"
android:elevation="5dp"
android:background="@drawable/circle_tintable"
android:src="@drawable/ic_phone_grey600_32dp"
android:tint="@color/green_600"/>
<TextView android:id="@+id/swipe_down_text"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_horizontal"
android:layout_marginTop="16dp"
android:textStyle="italic"
android:textColor="@color/gray20"
android:text="@string/webrtc_answer_decline_button__swipe_down_to_reject"/>
</merge>

View File

@@ -225,10 +225,12 @@
android:contentDescription="End call"
tools:visibility="visible"/>
<org.thoughtcrime.securesms.components.webrtc.WebRtcIncomingCallOverlay
android:id="@+id/callControls"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
<org.thoughtcrime.securesms.components.webrtc.WebRtcAnswerDeclineButton
android:id="@+id/answer_decline_button"
android:layout_gravity="bottom|center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="16dp"/>
</android.support.design.widget.CoordinatorLayout>

View File

@@ -1,29 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<org.thoughtcrime.securesms.components.multiwaveview.MultiWaveView
android:id="@+id/incomingCallWidget"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_marginBottom="-46dp"
android:background="@android:color/black"
android:visibility="gone"
/>
<TextView android:id="@+id/redphone_banner"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignTop="@id/incomingCallWidget"
android:gravity="center"
android:paddingTop="8dp"
android:paddingBottom="8dp"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="#FFFFFF"
android:textAllCaps="true"
android:background="@color/textsecure_primary"
android:text="@string/redphone_call_controls__signal_call"/>
</RelativeLayout>

View File

@@ -1251,6 +1251,8 @@
<string name="OutdatedBuildReminder_no_web_browser_installed">No web browser installed!</string>
<string name="ContactsCursorLoader_recent_chats">Recent chats</string>
<string name="ContactsCursorLoader_contacts">Contacts</string>
<string name="webrtc_answer_decline_button__swipe_up_to_answer">Swipe up to answer</string>
<string name="webrtc_answer_decline_button__swipe_down_to_reject">Swipe down to reject</string>
<!-- EOF -->