Can respond to incoming calls.

This commit is contained in:
2019-02-25 15:46:55 +01:00
parent 6b3d46f04f
commit 8b6c64fd2a
14 changed files with 482 additions and 35 deletions

View File

@ -0,0 +1,72 @@
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout 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"
tools:context=".ui.activities.IncomingCallActivity">
<TextView
android:id="@+id/call_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:textAppearance="@style/TextAppearance.AppCompat.Large"
app:layout_constraintBottom_toTopOf="@+id/linearLayout3"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
tools:text="Call title" />
<LinearLayout
android:id="@+id/linearLayout3"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:orientation="horizontal"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent">
<Button
android:id="@+id/reject_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:backgroundTint="@color/holo_red_dark"
android:textColor="@android:color/white"
android:text="@string/button_reject_call"
tools:ignore="ButtonStyle" />
<Button
android:id="@+id/accept_button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1"
android:backgroundTint="@color/holo_green_dark"
android:textColor="@android:color/white"
android:text="@string/button_accept_call"
tools:ignore="ButtonStyle" />
</LinearLayout>
<TextView
android:id="@+id/textView14"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginStart="8dp"
android:layout_marginTop="7dp"
android:layout_marginEnd="8dp"
android:layout_marginBottom="8dp"
android:text="@string/title_incoming_call"
android:textAppearance="@style/TextAppearance.AppCompat.Medium"
app:layout_constraintBottom_toTopOf="@+id/call_title"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent" />
</android.support.constraint.ConstraintLayout>

View File

@ -325,4 +325,8 @@
<string name="notification_call_reject">Rejeter</string>
<string name="notification_call_content">%s vous appelle.</string>
<string name="action_accelerate_notifications_refresh">Accélérer le rafraîchissement des notifications</string>
<string name="button_reject_call">Rejeter</string>
<string name="button_accept_call">Répondre</string>
<string name="title_incoming_call">Appel entrant</string>
<string name="err_get_next_pending_call_info">Impossible de récupérer les informations de l\'appel en cours !</string>
</resources>

View File

@ -8,7 +8,7 @@
<color name="darker_gray">#aaa</color>
<color name="darker_darker_gray">#5b5b5b</color>
<color name="dark_blue">#303f9f</color>
<color name="holo_red_dark">#ffcc0000</color>
<color name="holo_red_dark">#cc0000</color>
<color name="default_drawable_color">#000000</color>

View File

@ -324,4 +324,8 @@
<string name="notification_call_reject">Reject call</string>
<string name="notification_call_content">%s is calling you</string>
<string name="action_accelerate_notifications_refresh">Accelerate notifications refresh</string>
<string name="button_reject_call">Reject call</string>
<string name="button_accept_call">Accept call</string>
<string name="title_incoming_call">Incoming call</string>
<string name="err_get_next_pending_call_info">Could not get pending call information!</string>
</resources>