Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3b3c5c59 authored by sqian's avatar sqian
Browse files

Introduce the new UX of call redirection dialog UX

The content of the UX:

                       <pic> Call
         Choose how to place this call

Call using my phone number
Redirect call using <app name>
Cancel

More details:
1) The font size of the title is 18sp
2) The font size of button is 16sp
3) The upper margin of the icon is 16dp
4) The bottom margin of the icon is 16dp
5) The bottom margin of the title is 26dp
6) The upper and bottom margin of the button is 15dp
7) The left margin of the button is 15dp
8) The tint color of the icon is #4089F4
9) The color of the text is #212121
10) The color of the divider is #B8B8B8
11) The corner of the dialog is rounded as 15dp radius
12) All the buttons need to have ripple effect

Test: TestApp;
      Screenshot at b/130755810#comment3;
      Screenshot of Darkmode test at b/130755810#comment 4
Bug: 130755810
Change-Id: I1a3f0f71ada28389ce48445c06e62137c947cd9c
Merged-In: I1a3f0f71ada28389ce48445c06e62137c947cd9c
(cherry picked from commit 9fd71856)
parent 95a9ae79
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2019 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
  -->
<ripple xmlns:android="http://schemas.android.com/apk/res/android"
        android:color="?android:attr/colorControlHighlight" />
 No newline at end of file
+20 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2019 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
  -->
<shape xmlns:android="http://schemas.android.com/apk/res/android">
    <solid android:color="@android:color/white"/>
    <corners android:radius="15dp" />
</shape>
 No newline at end of file
+103 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2019 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
  -->
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
              android:layout_width="match_parent"
              android:layout_height="match_parent"
              android:paddingTop="0dp"
              android:paddingBottom="0dp"
              android:background="@drawable/call_redirection_dialog_background"
              android:orientation="vertical">

    <ImageView
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:layout_gravity="center"
            android:paddingTop="@dimen/call_redirection_dialog_image_upper_margin"
            android:paddingBottom="@dimen/call_redirection_dialog_image_bottom_margin"
            android:tint="@color/call_redirection_dialog_icon_tint_color"
            android:src="@drawable/ic_phone"/>

    <TextView
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center"
            android:paddingBottom="@dimen/call_redirection_dialog_title_bottom_margin"
            android:text="@string/alert_redirect_outgoing_call_or_not"
            android:textColor="@color/call_redirection_dialog_text_color"
            android:textSize="@dimen/call_redirection_dialog_title_font_size"
            android:textStyle="bold"/>

    <View
            android:layout_width="fill_parent"
            android:layout_height="1dp"
            android:background="@color/call_redirection_dialog_view_divider_color"/>

    <Button
            android:id="@+id/buttonFirstLine"
            android:text="@string/alert_place_unredirect_outgoing_call"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:gravity="left"
            android:background="@drawable/call_redirection_button_ripple_effect"
            android:paddingTop="@dimen/call_redirection_dialog_button_text_upper_bottom_margin"
            android:paddingBottom="@dimen/call_redirection_dialog_button_text_upper_bottom_margin"
            android:paddingLeft="@dimen/call_redirection_dialog_button_text_left_margin"
            android:paddingRight="@dimen/call_redirection_dialog_button_text_left_margin"
            android:textColor="@color/call_redirection_dialog_text_color"
            android:textSize="@dimen/call_redirection_dialog_button_font_size"
            android:textAllCaps="false"/>

    <View
            android:layout_width="fill_parent"
            android:layout_height="1dp"
            android:background="@color/call_redirection_dialog_view_divider_color"/>

    <Button
            android:id="@+id/buttonSecondLine"
            android:text="@string/alert_place_outgoing_call_with_redirection"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:gravity="left"
            android:background="@drawable/call_redirection_button_ripple_effect"
            android:paddingTop="@dimen/call_redirection_dialog_button_text_upper_bottom_margin"
            android:paddingBottom="@dimen/call_redirection_dialog_button_text_upper_bottom_margin"
            android:paddingLeft="@dimen/call_redirection_dialog_button_text_left_margin"
            android:textColor="@color/call_redirection_dialog_text_color"
            android:textSize="@dimen/call_redirection_dialog_button_font_size"
            android:textAllCaps="false"/>

    <View
            android:layout_width="fill_parent"
            android:layout_height="1dp"
            android:background="@color/call_redirection_dialog_view_divider_color"/>

    <Button
            android:id="@+id/buttonThirdLine"
            android:text="@string/cancel"
            android:layout_width="fill_parent"
            android:layout_height="wrap_content"
            android:gravity="left"
            android:background="@drawable/call_redirection_button_ripple_effect"
            android:paddingTop="@dimen/call_redirection_dialog_button_text_upper_bottom_margin"
            android:paddingBottom="@dimen/call_redirection_dialog_button_text_upper_bottom_margin"
            android:paddingLeft="@dimen/call_redirection_dialog_button_text_left_margin"
            android:paddingRight="@dimen/call_redirection_dialog_button_text_left_margin"
            android:textColor="@color/call_redirection_dialog_text_color"
            android:textSize="@dimen/call_redirection_dialog_button_font_size"
            android:textAllCaps="false"/>

</LinearLayout>
 No newline at end of file
+5 −0
Original line number Diff line number Diff line
@@ -27,4 +27,9 @@
    <!--follows dialer color-->
    <color name="notification_action_answer">#097138</color>
    <color name="notification_action_decline">#A52714</color>

    <color name="call_redirection_dialog_icon_tint_color">#4089F4</color>
    <color name="call_redirection_dialog_text_color">#212121</color>
    <color name="call_redirection_dialog_view_divider_color">#B8B8B8</color>

</resources>
+9 −0
Original line number Diff line number Diff line
@@ -33,4 +33,13 @@
    <dimen name="blocked_numbers_line_spacing">8sp</dimen>
    <dimen name="blocked_numbers_secondary_line_spacing">6sp</dimen>
    <dimen name="blocked_numbers_divider_stroke">1dp</dimen>

    <dimen name="call_redirection_dialog_title_font_size">18sp</dimen>
    <dimen name="call_redirection_dialog_button_font_size">16sp</dimen>
    <dimen name="call_redirection_dialog_image_upper_margin">16dp</dimen>
    <dimen name="call_redirection_dialog_image_bottom_margin">10dp</dimen>
    <dimen name="call_redirection_dialog_title_bottom_margin">26dp</dimen>
    <dimen name="call_redirection_dialog_button_text_upper_bottom_margin">15dp</dimen>
    <dimen name="call_redirection_dialog_button_text_left_margin">15dp</dimen>

</resources>
Loading