diff options
Diffstat (limited to 'java/com/android/incallui/video/impl/res')
45 files changed, 611 insertions, 0 deletions
diff --git a/java/com/android/incallui/video/impl/res/color/videocall_button_icon_tint.xml b/java/com/android/incallui/video/impl/res/color/videocall_button_icon_tint.xml new file mode 100644 index 000000000..b46607b1b --- /dev/null +++ b/java/com/android/incallui/video/impl/res/color/videocall_button_icon_tint.xml @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="utf-8"?> +<selector xmlns:android="http://schemas.android.com/apk/res/android"> + <item android:color="#ff000000" android:state_checked="true"/> + <item android:color="#ffffffff"/> +</selector> diff --git a/java/com/android/incallui/video/impl/res/drawable-hdpi/ic_switch_camera.png b/java/com/android/incallui/video/impl/res/drawable-hdpi/ic_switch_camera.png Binary files differnew file mode 100644 index 000000000..b5c6f0a87 --- /dev/null +++ b/java/com/android/incallui/video/impl/res/drawable-hdpi/ic_switch_camera.png diff --git a/java/com/android/incallui/video/impl/res/drawable-hdpi/video_button_bg_checked.png b/java/com/android/incallui/video/impl/res/drawable-hdpi/video_button_bg_checked.png Binary files differnew file mode 100644 index 000000000..2ab2f21a7 --- /dev/null +++ b/java/com/android/incallui/video/impl/res/drawable-hdpi/video_button_bg_checked.png diff --git a/java/com/android/incallui/video/impl/res/drawable-hdpi/video_button_bg_checked_disabled.png b/java/com/android/incallui/video/impl/res/drawable-hdpi/video_button_bg_checked_disabled.png Binary files differnew file mode 100644 index 000000000..2deaadd76 --- /dev/null +++ b/java/com/android/incallui/video/impl/res/drawable-hdpi/video_button_bg_checked_disabled.png diff --git a/java/com/android/incallui/video/impl/res/drawable-hdpi/video_button_bg_checked_pressed.png b/java/com/android/incallui/video/impl/res/drawable-hdpi/video_button_bg_checked_pressed.png Binary files differnew file mode 100644 index 000000000..c4147fa62 --- /dev/null +++ b/java/com/android/incallui/video/impl/res/drawable-hdpi/video_button_bg_checked_pressed.png diff --git a/java/com/android/incallui/video/impl/res/drawable-hdpi/video_button_bg_default.png b/java/com/android/incallui/video/impl/res/drawable-hdpi/video_button_bg_default.png Binary files differnew file mode 100644 index 000000000..c59e21504 --- /dev/null +++ b/java/com/android/incallui/video/impl/res/drawable-hdpi/video_button_bg_default.png diff --git a/java/com/android/incallui/video/impl/res/drawable-hdpi/video_button_bg_disabled.png b/java/com/android/incallui/video/impl/res/drawable-hdpi/video_button_bg_disabled.png Binary files differnew file mode 100644 index 000000000..95d6824f5 --- /dev/null +++ b/java/com/android/incallui/video/impl/res/drawable-hdpi/video_button_bg_disabled.png diff --git a/java/com/android/incallui/video/impl/res/drawable-hdpi/video_button_bg_pressed.png b/java/com/android/incallui/video/impl/res/drawable-hdpi/video_button_bg_pressed.png Binary files differnew file mode 100644 index 000000000..9a525a374 --- /dev/null +++ b/java/com/android/incallui/video/impl/res/drawable-hdpi/video_button_bg_pressed.png diff --git a/java/com/android/incallui/video/impl/res/drawable-mdpi/ic_switch_camera.png b/java/com/android/incallui/video/impl/res/drawable-mdpi/ic_switch_camera.png Binary files differnew file mode 100644 index 000000000..f3427a02e --- /dev/null +++ b/java/com/android/incallui/video/impl/res/drawable-mdpi/ic_switch_camera.png diff --git a/java/com/android/incallui/video/impl/res/drawable-mdpi/video_button_bg_checked.png b/java/com/android/incallui/video/impl/res/drawable-mdpi/video_button_bg_checked.png Binary files differnew file mode 100644 index 000000000..c3ff7b2bb --- /dev/null +++ b/java/com/android/incallui/video/impl/res/drawable-mdpi/video_button_bg_checked.png diff --git a/java/com/android/incallui/video/impl/res/drawable-mdpi/video_button_bg_checked_disabled.png b/java/com/android/incallui/video/impl/res/drawable-mdpi/video_button_bg_checked_disabled.png Binary files differnew file mode 100644 index 000000000..c75281332 --- /dev/null +++ b/java/com/android/incallui/video/impl/res/drawable-mdpi/video_button_bg_checked_disabled.png diff --git a/java/com/android/incallui/video/impl/res/drawable-mdpi/video_button_bg_checked_pressed.png b/java/com/android/incallui/video/impl/res/drawable-mdpi/video_button_bg_checked_pressed.png Binary files differnew file mode 100644 index 000000000..fd16baef7 --- /dev/null +++ b/java/com/android/incallui/video/impl/res/drawable-mdpi/video_button_bg_checked_pressed.png diff --git a/java/com/android/incallui/video/impl/res/drawable-mdpi/video_button_bg_default.png b/java/com/android/incallui/video/impl/res/drawable-mdpi/video_button_bg_default.png Binary files differnew file mode 100644 index 000000000..3fe2446e3 --- /dev/null +++ b/java/com/android/incallui/video/impl/res/drawable-mdpi/video_button_bg_default.png diff --git a/java/com/android/incallui/video/impl/res/drawable-mdpi/video_button_bg_disabled.png b/java/com/android/incallui/video/impl/res/drawable-mdpi/video_button_bg_disabled.png Binary files differnew file mode 100644 index 000000000..1ff3e7c25 --- /dev/null +++ b/java/com/android/incallui/video/impl/res/drawable-mdpi/video_button_bg_disabled.png diff --git a/java/com/android/incallui/video/impl/res/drawable-mdpi/video_button_bg_pressed.png b/java/com/android/incallui/video/impl/res/drawable-mdpi/video_button_bg_pressed.png Binary files differnew file mode 100644 index 000000000..aa7289af1 --- /dev/null +++ b/java/com/android/incallui/video/impl/res/drawable-mdpi/video_button_bg_pressed.png diff --git a/java/com/android/incallui/video/impl/res/drawable-xhdpi/ic_switch_camera.png b/java/com/android/incallui/video/impl/res/drawable-xhdpi/ic_switch_camera.png Binary files differnew file mode 100644 index 000000000..491547189 --- /dev/null +++ b/java/com/android/incallui/video/impl/res/drawable-xhdpi/ic_switch_camera.png diff --git a/java/com/android/incallui/video/impl/res/drawable-xhdpi/video_button_bg_checked.png b/java/com/android/incallui/video/impl/res/drawable-xhdpi/video_button_bg_checked.png Binary files differnew file mode 100644 index 000000000..799a78ebb --- /dev/null +++ b/java/com/android/incallui/video/impl/res/drawable-xhdpi/video_button_bg_checked.png diff --git a/java/com/android/incallui/video/impl/res/drawable-xhdpi/video_button_bg_checked_disabled.png b/java/com/android/incallui/video/impl/res/drawable-xhdpi/video_button_bg_checked_disabled.png Binary files differnew file mode 100644 index 000000000..4d5e03320 --- /dev/null +++ b/java/com/android/incallui/video/impl/res/drawable-xhdpi/video_button_bg_checked_disabled.png diff --git a/java/com/android/incallui/video/impl/res/drawable-xhdpi/video_button_bg_checked_pressed.png b/java/com/android/incallui/video/impl/res/drawable-xhdpi/video_button_bg_checked_pressed.png Binary files differnew file mode 100644 index 000000000..62cd1a477 --- /dev/null +++ b/java/com/android/incallui/video/impl/res/drawable-xhdpi/video_button_bg_checked_pressed.png diff --git a/java/com/android/incallui/video/impl/res/drawable-xhdpi/video_button_bg_default.png b/java/com/android/incallui/video/impl/res/drawable-xhdpi/video_button_bg_default.png Binary files differnew file mode 100644 index 000000000..c68ad909a --- /dev/null +++ b/java/com/android/incallui/video/impl/res/drawable-xhdpi/video_button_bg_default.png diff --git a/java/com/android/incallui/video/impl/res/drawable-xhdpi/video_button_bg_disabled.png b/java/com/android/incallui/video/impl/res/drawable-xhdpi/video_button_bg_disabled.png Binary files differnew file mode 100644 index 000000000..e5c3fc48d --- /dev/null +++ b/java/com/android/incallui/video/impl/res/drawable-xhdpi/video_button_bg_disabled.png diff --git a/java/com/android/incallui/video/impl/res/drawable-xhdpi/video_button_bg_pressed.png b/java/com/android/incallui/video/impl/res/drawable-xhdpi/video_button_bg_pressed.png Binary files differnew file mode 100644 index 000000000..583c3de82 --- /dev/null +++ b/java/com/android/incallui/video/impl/res/drawable-xhdpi/video_button_bg_pressed.png diff --git a/java/com/android/incallui/video/impl/res/drawable-xxhdpi/ic_switch_camera.png b/java/com/android/incallui/video/impl/res/drawable-xxhdpi/ic_switch_camera.png Binary files differnew file mode 100644 index 000000000..19a9344e9 --- /dev/null +++ b/java/com/android/incallui/video/impl/res/drawable-xxhdpi/ic_switch_camera.png diff --git a/java/com/android/incallui/video/impl/res/drawable-xxhdpi/video_button_bg_checked.png b/java/com/android/incallui/video/impl/res/drawable-xxhdpi/video_button_bg_checked.png Binary files differnew file mode 100644 index 000000000..5a7702bbc --- /dev/null +++ b/java/com/android/incallui/video/impl/res/drawable-xxhdpi/video_button_bg_checked.png diff --git a/java/com/android/incallui/video/impl/res/drawable-xxhdpi/video_button_bg_checked_disabled.png b/java/com/android/incallui/video/impl/res/drawable-xxhdpi/video_button_bg_checked_disabled.png Binary files differnew file mode 100644 index 000000000..a0be8d17d --- /dev/null +++ b/java/com/android/incallui/video/impl/res/drawable-xxhdpi/video_button_bg_checked_disabled.png diff --git a/java/com/android/incallui/video/impl/res/drawable-xxhdpi/video_button_bg_checked_pressed.png b/java/com/android/incallui/video/impl/res/drawable-xxhdpi/video_button_bg_checked_pressed.png Binary files differnew file mode 100644 index 000000000..5671bfa06 --- /dev/null +++ b/java/com/android/incallui/video/impl/res/drawable-xxhdpi/video_button_bg_checked_pressed.png diff --git a/java/com/android/incallui/video/impl/res/drawable-xxhdpi/video_button_bg_default.png b/java/com/android/incallui/video/impl/res/drawable-xxhdpi/video_button_bg_default.png Binary files differnew file mode 100644 index 000000000..527b3c47e --- /dev/null +++ b/java/com/android/incallui/video/impl/res/drawable-xxhdpi/video_button_bg_default.png diff --git a/java/com/android/incallui/video/impl/res/drawable-xxhdpi/video_button_bg_disabled.png b/java/com/android/incallui/video/impl/res/drawable-xxhdpi/video_button_bg_disabled.png Binary files differnew file mode 100644 index 000000000..996185890 --- /dev/null +++ b/java/com/android/incallui/video/impl/res/drawable-xxhdpi/video_button_bg_disabled.png diff --git a/java/com/android/incallui/video/impl/res/drawable-xxhdpi/video_button_bg_pressed.png b/java/com/android/incallui/video/impl/res/drawable-xxhdpi/video_button_bg_pressed.png Binary files differnew file mode 100644 index 000000000..56295b10f --- /dev/null +++ b/java/com/android/incallui/video/impl/res/drawable-xxhdpi/video_button_bg_pressed.png diff --git a/java/com/android/incallui/video/impl/res/drawable-xxxhdpi/ic_switch_camera.png b/java/com/android/incallui/video/impl/res/drawable-xxxhdpi/ic_switch_camera.png Binary files differnew file mode 100644 index 000000000..529c0a4d5 --- /dev/null +++ b/java/com/android/incallui/video/impl/res/drawable-xxxhdpi/ic_switch_camera.png diff --git a/java/com/android/incallui/video/impl/res/drawable/videocall_background_circle_white.xml b/java/com/android/incallui/video/impl/res/drawable/videocall_background_circle_white.xml new file mode 100644 index 000000000..ee514c776 --- /dev/null +++ b/java/com/android/incallui/video/impl/res/drawable/videocall_background_circle_white.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8"?> +<ripple xmlns:android="http://schemas.android.com/apk/res/android" + android:color="#80888888"> + <item> + <shape + android:shape="oval"> + <solid android:color="@color/incall_button_white"/> + </shape> + </item> +</ripple> diff --git a/java/com/android/incallui/video/impl/res/drawable/videocall_video_button_background.xml b/java/com/android/incallui/video/impl/res/drawable/videocall_video_button_background.xml new file mode 100644 index 000000000..5e4841327 --- /dev/null +++ b/java/com/android/incallui/video/impl/res/drawable/videocall_video_button_background.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="utf-8"?> +<ripple xmlns:android="http://schemas.android.com/apk/res/android" + android:color="@color/incall_button_ripple"> + <item android:id="@android:id/mask"> + <inset android:inset="5dp"> + <shape android:shape="oval"> + <solid android:color="@android:color/white"/> + </shape> + </inset> + </item> + <item> + <selector> + <item + android:drawable="@drawable/video_button_bg_checked_pressed" + android:state_checked="true" + android:state_pressed="true"/> + <item + android:drawable="@drawable/video_button_bg_checked" + android:state_checked="true"/> + <item + android:drawable="@drawable/video_button_bg_pressed" + android:state_pressed="true"/> + <item + android:drawable="@drawable/video_button_bg_default"/> + </selector> + </item> +</ripple> diff --git a/java/com/android/incallui/video/impl/res/layout-v21/switch_camera_button.xml b/java/com/android/incallui/video/impl/res/layout-v21/switch_camera_button.xml new file mode 100644 index 000000000..1fb1bb088 --- /dev/null +++ b/java/com/android/incallui/video/impl/res/layout-v21/switch_camera_button.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8"?> +<ImageButton xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/videocall_switch_video" + style="@style/Incall.Button.VideoCall" + android:contentDescription="@string/incall_content_description_swap_video" + android:src="@drawable/front_back_switch_button_animation"/> diff --git a/java/com/android/incallui/video/impl/res/layout/frag_videocall.xml b/java/com/android/incallui/video/impl/res/layout/frag_videocall.xml new file mode 100644 index 000000000..dc663dda1 --- /dev/null +++ b/java/com/android/incallui/video/impl/res/layout/frag_videocall.xml @@ -0,0 +1,114 @@ +<?xml version="1.0" encoding="utf-8"?> +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="@android:color/black" + android:orientation="vertical"> + + <TextureView + android:id="@+id/videocall_video_remote" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_alignParentStart="true" + android:layout_alignParentTop="true" + android:importantForAccessibility="no"/> + + <ImageView + android:id="@+id/videocall_remote_off_blurred_image_view" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_alignParentStart="true" + android:layout_alignParentTop="true" + android:scaleType="fitCenter"/> + + <TextView + android:gravity="center" + android:id="@+id/videocall_remote_video_off" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerInParent="true" + android:accessibilityTraversalBefore="@+id/videocall_speaker_button" + android:drawablePadding="8dp" + android:drawableTop="@drawable/quantum_ic_videocam_off_white_36" + android:padding="64dp" + android:text="@string/videocall_remote_video_off" + android:textAppearance="@style/Dialer.Incall.TextAppearance" + android:visibility="gone" + tools:visibility="visible"/> + + <View + android:id="@+id/videocall_fullscreen_background" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_alignParentBottom="true" + android:layout_alignParentStart="true" + android:background="@color/videocall_overlay_background_color"/> + + <TextureView + android:id="@+id/videocall_video_preview" + android:layout_width="@dimen/videocall_preview_width" + android:layout_height="@dimen/videocall_preview_height" + android:layout_marginBottom="@dimen/videocall_preview_margin_bottom" + android:layout_marginStart="@dimen/videocall_preview_margin_start" + android:layout_alignParentBottom="true" + android:layout_alignParentStart="true" + android:importantForAccessibility="no"/> + + <ImageView + android:id="@+id/videocall_preview_off_blurred_image_view" + android:layout_width="@dimen/videocall_preview_width" + android:layout_height="@dimen/videocall_preview_height" + android:layout_marginBottom="@dimen/videocall_preview_margin_bottom" + android:layout_marginStart="@dimen/videocall_preview_margin_start" + android:layout_alignParentBottom="true" + android:layout_alignParentStart="true" + android:scaleType="center"/> + + <View + android:id="@+id/videocall_green_screen_background" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_alignParentBottom="true" + android:layout_alignParentStart="true" + android:background="@color/videocall_overlay_background_color"/> + + <ImageView + android:id="@+id/videocall_video_preview_off_overlay" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignBottom="@+id/videocall_video_preview" + android:layout_alignLeft="@+id/videocall_video_preview" + android:layout_alignRight="@+id/videocall_video_preview" + android:layout_alignTop="@+id/videocall_video_preview" + android:scaleType="center" + android:src="@drawable/quantum_ic_videocam_off_white_36" + android:visibility="gone" + android:importantForAccessibility="no" + tools:visibility="visible"/> + + <ImageView + android:id="@+id/videocall_video_preview_mute_overlay" + android:layout_width="32dp" + android:layout_height="32dp" + android:layout_alignBottom="@+id/videocall_video_preview" + android:layout_alignRight="@+id/videocall_video_preview" + android:background="@drawable/videocall_background_circle_white" + android:contentDescription="@string/incall_content_description_muted" + android:scaleType="center" + android:src="@drawable/quantum_ic_mic_off_black_24" + android:visibility="gone" + tools:visibility="visible"/> + + <include + layout="@layout/videocall_controls" + android:layout_width="match_parent" + android:layout_height="match_parent"/> + + <FrameLayout + android:id="@+id/videocall_on_hold_banner" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_alignParentTop="true"/> + +</RelativeLayout> diff --git a/java/com/android/incallui/video/impl/res/layout/frag_videocall_land.xml b/java/com/android/incallui/video/impl/res/layout/frag_videocall_land.xml new file mode 100644 index 000000000..2353deea1 --- /dev/null +++ b/java/com/android/incallui/video/impl/res/layout/frag_videocall_land.xml @@ -0,0 +1,111 @@ +<?xml version="1.0" encoding="utf-8"?> +<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:tools="http://schemas.android.com/tools" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:background="@android:color/black"> + + <TextureView + android:id="@+id/videocall_video_remote" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_alignParentStart="true" + android:layout_alignParentTop="true" + android:importantForAccessibility="no"/> + + <ImageView + android:id="@+id/videocall_remote_off_blurred_image_view" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_alignParentStart="true" + android:layout_alignParentTop="true" + android:scaleType="fitCenter"/> + + <TextView + android:gravity="center" + android:id="@+id/videocall_remote_video_off" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_centerInParent="true" + android:accessibilityTraversalBefore="@+id/videocall_speaker_button" + android:drawablePadding="8dp" + android:drawableTop="@drawable/quantum_ic_videocam_off_white_36" + android:padding="64dp" + android:text="@string/videocall_remote_video_off" + android:textAppearance="@style/Dialer.Incall.TextAppearance" + android:visibility="gone" + tools:visibility="visible"/> + + <View + android:id="@+id/videocall_fullscreen_background" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_alignParentBottom="true" + android:layout_alignParentStart="true" + android:background="@color/videocall_overlay_background_color"/> + + <TextureView + android:id="@+id/videocall_video_preview" + android:layout_width="@dimen/videocall_preview_width" + android:layout_height="@dimen/videocall_preview_height" + android:layout_marginEnd="@dimen/videocall_preview_margin_end" + android:layout_alignParentBottom="true" + android:layout_alignParentEnd="true" + android:importantForAccessibility="no"/> + + <ImageView + android:id="@+id/videocall_preview_off_blurred_image_view" + android:layout_width="@dimen/videocall_preview_width" + android:layout_height="@dimen/videocall_preview_height" + android:layout_marginEnd="@dimen/videocall_preview_margin_end" + android:layout_alignParentBottom="true" + android:layout_alignParentEnd="true" + android:scaleType="center"/> + + <View + android:id="@+id/videocall_green_screen_background" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:layout_alignParentBottom="true" + android:layout_alignParentStart="true" + android:background="@color/videocall_overlay_background_color"/> + + <ImageView + android:id="@+id/videocall_video_preview_off_overlay" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignBottom="@+id/videocall_video_preview" + android:layout_alignLeft="@+id/videocall_video_preview" + android:layout_alignRight="@+id/videocall_video_preview" + android:layout_alignTop="@+id/videocall_video_preview" + android:scaleType="center" + android:src="@drawable/quantum_ic_videocam_off_white_36" + android:visibility="gone" + android:importantForAccessibility="no" + tools:visibility="visible"/> + + <ImageView + android:id="@+id/videocall_video_preview_mute_overlay" + android:layout_width="32dp" + android:layout_height="32dp" + android:layout_alignBottom="@+id/videocall_video_preview" + android:layout_alignRight="@+id/videocall_video_preview" + android:background="@drawable/videocall_background_circle_white" + android:contentDescription="@string/incall_content_description_muted" + android:scaleType="center" + android:src="@drawable/quantum_ic_mic_off_black_24" + android:visibility="gone" + tools:visibility="visible"/> + + <include + layout="@layout/videocall_controls_land" + android:layout_width="match_parent" + android:layout_height="match_parent"/> + + <FrameLayout + android:id="@+id/videocall_on_hold_banner" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_alignParentTop="true"/> + +</RelativeLayout> diff --git a/java/com/android/incallui/video/impl/res/layout/switch_camera_button.xml b/java/com/android/incallui/video/impl/res/layout/switch_camera_button.xml new file mode 100644 index 000000000..87c2e1b6c --- /dev/null +++ b/java/com/android/incallui/video/impl/res/layout/switch_camera_button.xml @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8"?> +<ImageButton xmlns:android="http://schemas.android.com/apk/res/android" + android:id="@+id/videocall_switch_video" + style="@style/Incall.Button.VideoCall" + android:contentDescription="@string/incall_content_description_swap_video" + android:src="@drawable/ic_switch_camera"/> diff --git a/java/com/android/incallui/video/impl/res/layout/video_contact_grid.xml b/java/com/android/incallui/video/impl/res/layout/video_contact_grid.xml new file mode 100644 index 000000000..ad984f36e --- /dev/null +++ b/java/com/android/incallui/video/impl/res/layout/video_contact_grid.xml @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="utf-8"?> +<LinearLayout + 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="wrap_content" + android:gravity="center_horizontal" + android:paddingTop="16dp" + android:orientation="vertical"> + + <include + layout="@layout/incall_contactgrid_top_row" + android:layout_width="wrap_content" + android:layout_height="wrap_content"/> + + <!-- We have to keep deprecated singleLine to allow long text being truncated with ellipses. + b/31396406 --> + <com.android.incallui.autoresizetext.AutoResizeTextView + android:id="@id/contactgrid_contact_name" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:singleLine="true" + android:textAppearance="@style/Dialer.Incall.TextAppearance.Large" + app:autoResizeText_minTextSize="28sp" + tools:text="Jake Peralta" + tools:ignore="Deprecated"/> + + <include + layout="@layout/incall_contactgrid_bottom_row" + android:layout_width="wrap_content" + android:layout_height="wrap_content"/> +</LinearLayout> diff --git a/java/com/android/incallui/video/impl/res/layout/videocall_controls.xml b/java/com/android/incallui/video/impl/res/layout/videocall_controls.xml new file mode 100644 index 000000000..b3141bdf3 --- /dev/null +++ b/java/com/android/incallui/video/impl/res/layout/videocall_controls.xml @@ -0,0 +1,113 @@ +<?xml version="1.0" encoding="utf-8"?> +<RelativeLayout + 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:id="@+id/videocall_video_controls_container" + android:fitsSystemWindows="true" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical"> + + <include + android:id="@+id/incall_contact_grid" + layout="@layout/video_contact_grid" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="16dp" + android:layout_marginStart="24dp" + android:layout_marginEnd="24dp"/> + + <!-- This placeholder matches the position of the preview UI and is used to + anchor video buttons. This is needed in greenscreen mode when the + preview is fullscreen but we want the controls to be positioned as + normal. --> + <Space + android:id="@+id/videocall_video_preview_placeholder" + android:layout_width="@dimen/videocall_preview_width" + android:layout_height="@dimen/videocall_preview_height" + android:layout_marginBottom="@dimen/videocall_preview_margin_bottom" + android:layout_marginStart="@dimen/videocall_preview_margin_start" + android:layout_alignParentBottom="true" + android:layout_alignParentStart="true" + android:visibility="invisible"/> + + <LinearLayout + android:id="@+id/videocall_video_controls" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_above="@+id/videocall_video_preview_placeholder" + android:layout_alignEnd="@+id/videocall_video_preview_placeholder" + android:layout_alignStart="@+id/videocall_video_preview_placeholder" + android:gravity="center_horizontal" + android:orientation="vertical" + android:visibility="invisible" + tools:visibility="visible"> + <com.android.incallui.video.impl.CheckableImageButton + android:id="@+id/videocall_speaker_button" + style="@style/Incall.Button.VideoCall" + android:layout_width="@dimen/videocall_button_size" + android:layout_height="@dimen/videocall_button_size" + android:layout_marginBottom="@dimen/videocall_button_spacing" + android:checked="true" + android:src="@drawable/quantum_ic_volume_up_white_36" + app:contentDescriptionChecked="@string/incall_content_description_speaker" + app:contentDescriptionUnchecked="@string/incall_content_description_earpiece" + /> + <com.android.incallui.video.impl.CheckableImageButton + android:id="@+id/videocall_mute_button" + style="@style/Incall.Button.VideoCall" + android:layout_width="@dimen/videocall_button_size" + android:layout_height="@dimen/videocall_button_size" + android:layout_marginBottom="@dimen/videocall_button_spacing" + android:src="@drawable/quantum_ic_mic_off_white_36" + app:contentDescriptionChecked="@string/incall_content_description_muted" + app:contentDescriptionUnchecked="@string/incall_content_description_unmuted" + /> + <com.android.incallui.video.impl.CheckableImageButton + android:id="@+id/videocall_mute_video" + style="@style/Incall.Button.VideoCall" + android:layout_width="@dimen/videocall_button_size" + android:layout_height="@dimen/videocall_button_size" + android:layout_marginBottom="@dimen/videocall_button_spacing" + android:src="@drawable/quantum_ic_videocam_off_white_36" + app:contentDescriptionChecked="@string/incall_content_description_video_off" + app:contentDescriptionUnchecked="@string/incall_content_description_video_on" + /> + <include + layout="@layout/switch_camera_button" + android:layout_width="@dimen/videocall_button_size" + android:layout_height="@dimen/videocall_button_size" + android:layout_marginBottom="@dimen/videocall_button_spacing"/> + </LinearLayout> + + <FrameLayout + android:id="@+id/videocall_switch_controls" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginBottom="36dp" + android:layout_marginEnd="24dp" + android:layout_alignParentBottom="true" + android:layout_alignParentEnd="true"> + <ImageButton + android:id="@+id/videocall_switch_on_hold" + style="@style/Incall.Button.VideoCall" + android:layout_width="@dimen/videocall_button_size" + android:layout_height="@dimen/videocall_button_size" + android:contentDescription="@string/incall_content_description_swap_calls" + android:src="@drawable/quantum_ic_swap_calls_white_36" + android:visibility="gone" + tools:visibility="visible" + /> + </FrameLayout> + + <ImageButton + android:id="@+id/videocall_end_call" + style="@style/Incall.Button.End" + android:layout_marginBottom="36dp" + android:layout_alignParentBottom="true" + android:layout_centerHorizontal="true" + android:contentDescription="@string/incall_content_description_end_call" + android:visibility="visible"/> + +</RelativeLayout> diff --git a/java/com/android/incallui/video/impl/res/layout/videocall_controls_land.xml b/java/com/android/incallui/video/impl/res/layout/videocall_controls_land.xml new file mode 100644 index 000000000..d71b3c00e --- /dev/null +++ b/java/com/android/incallui/video/impl/res/layout/videocall_controls_land.xml @@ -0,0 +1,115 @@ +<?xml version="1.0" encoding="utf-8"?> +<RelativeLayout + 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:id="@+id/videocall_video_controls_container" + android:fitsSystemWindows="true" + android:layout_width="match_parent" + android:layout_height="match_parent" + android:orientation="vertical"> + + <include + android:id="@+id/incall_contact_grid" + layout="@layout/video_contact_grid" + android:layout_width="match_parent" + android:layout_height="wrap_content" + android:layout_marginTop="16dp" + android:layout_marginStart="24dp" + android:layout_marginEnd="24dp"/> + + <!-- This placeholder matches the position of the preview UI and is used to + anchor video buttons. This is needed in greenscreen mode when the + preview is fullscreen but we want the controls to be positioned as + normal. --> + <Space + android:id="@+id/videocall_video_preview_placeholder" + android:layout_width="@dimen/videocall_preview_width" + android:layout_height="@dimen/videocall_preview_height" + android:layout_marginEnd="@dimen/videocall_preview_margin_end" + android:layout_alignParentBottom="true" + android:layout_alignParentEnd="true" + android:visibility="invisible"/> + + <LinearLayout + android:id="@+id/videocall_video_controls" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_alignBottom="@+id/videocall_video_preview_placeholder" + android:layout_alignTop="@+id/videocall_video_preview_placeholder" + android:layout_toStartOf="@+id/videocall_video_preview_placeholder" + android:gravity="center_horizontal" + android:orientation="horizontal" + android:visibility="invisible" + tools:visibility="visible"> + <com.android.incallui.video.impl.CheckableImageButton + android:id="@+id/videocall_speaker_button" + style="@style/Incall.Button.VideoCall" + android:layout_width="@dimen/videocall_button_size" + android:layout_height="@dimen/videocall_button_size" + android:layout_marginEnd="24dp" + android:checked="true" + android:src="@drawable/quantum_ic_volume_up_white_36" + app:contentDescriptionChecked="@string/incall_content_description_speaker" + app:contentDescriptionUnchecked="@string/incall_content_description_earpiece" + /> + <com.android.incallui.video.impl.CheckableImageButton + android:id="@+id/videocall_mute_button" + style="@style/Incall.Button.VideoCall" + android:layout_width="@dimen/videocall_button_size" + android:layout_height="@dimen/videocall_button_size" + android:layout_marginEnd="24dp" + android:scaleType="center" + android:src="@drawable/quantum_ic_mic_off_white_36" + app:contentDescriptionChecked="@string/incall_content_description_muted" + app:contentDescriptionUnchecked="@string/incall_content_description_unmuted" + /> + <com.android.incallui.video.impl.CheckableImageButton + android:id="@+id/videocall_mute_video" + style="@style/Incall.Button.VideoCall" + android:layout_width="@dimen/videocall_button_size" + android:layout_height="@dimen/videocall_button_size" + android:layout_marginEnd="24dp" + android:scaleType="center" + android:src="@drawable/quantum_ic_videocam_off_white_36" + app:contentDescriptionChecked="@string/incall_content_description_video_off" + app:contentDescriptionUnchecked="@string/incall_content_description_video_on" + /> + <include + layout="@layout/switch_camera_button" + android:layout_width="@dimen/videocall_button_size" + android:layout_height="@dimen/videocall_button_size" + android:layout_marginEnd="24dp"/> + </LinearLayout> + + <FrameLayout + android:id="@+id/videocall_switch_controls" + android:layout_width="wrap_content" + android:layout_height="wrap_content" + android:layout_marginTop="36dp" + android:layout_marginEnd="36dp" + android:layout_alignParentEnd="true" + android:layout_alignParentTop="true"> + <ImageButton + android:id="@+id/videocall_switch_on_hold" + style="@style/Incall.Button.VideoCall" + android:layout_width="@dimen/videocall_button_size" + android:layout_height="@dimen/videocall_button_size" + android:contentDescription="@string/incall_content_description_swap_calls" + android:src="@drawable/quantum_ic_swap_calls_white_36" + android:visibility="gone" + tools:visibility="visible" + /> + </FrameLayout> + + <ImageButton + android:id="@+id/videocall_end_call" + style="@style/Incall.Button.End" + android:layout_marginEnd="36dp" + android:layout_alignParentEnd="true" + android:layout_centerVertical="true" + android:contentDescription="@string/incall_content_description_end_call" + android:visibility="visible" + tools:visibility="visible"/> + +</RelativeLayout> diff --git a/java/com/android/incallui/video/impl/res/values-h580dp/dimens.xml b/java/com/android/incallui/video/impl/res/values-h580dp/dimens.xml new file mode 100644 index 000000000..b1a86a0fa --- /dev/null +++ b/java/com/android/incallui/video/impl/res/values-h580dp/dimens.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <dimen name="videocall_button_spacing">16dp</dimen> + <dimen name="videocall_button_size">72dp</dimen> + <dimen name="videocall_preview_width">88dp</dimen> + <dimen name="videocall_preview_height">88dp</dimen> +</resources> diff --git a/java/com/android/incallui/video/impl/res/values-w460dp/dimens.xml b/java/com/android/incallui/video/impl/res/values-w460dp/dimens.xml new file mode 100644 index 000000000..b1a86a0fa --- /dev/null +++ b/java/com/android/incallui/video/impl/res/values-w460dp/dimens.xml @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <dimen name="videocall_button_spacing">16dp</dimen> + <dimen name="videocall_button_size">72dp</dimen> + <dimen name="videocall_preview_width">88dp</dimen> + <dimen name="videocall_preview_height">88dp</dimen> +</resources> diff --git a/java/com/android/incallui/video/impl/res/values/attrs.xml b/java/com/android/incallui/video/impl/res/values/attrs.xml new file mode 100644 index 000000000..e4cd8af89 --- /dev/null +++ b/java/com/android/incallui/video/impl/res/values/attrs.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <declare-styleable name="CheckableImageButton"> + <attr name="android:checked"/> + <attr name="contentDescriptionChecked" format="reference|string"/> + <attr name="contentDescriptionUnchecked" format="reference|string"/> + </declare-styleable> +</resources> diff --git a/java/com/android/incallui/video/impl/res/values/dimens.xml b/java/com/android/incallui/video/impl/res/values/dimens.xml new file mode 100644 index 000000000..45860036f --- /dev/null +++ b/java/com/android/incallui/video/impl/res/values/dimens.xml @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + <dimen name="videocall_preview_width">72dp</dimen> + <dimen name="videocall_preview_height">72dp</dimen> + <dimen name="videocall_preview_margin_bottom">24dp</dimen> + <dimen name="videocall_preview_margin_start">24dp</dimen> + <dimen name="videocall_preview_margin_end">24dp</dimen> + <dimen name="videocall_button_spacing">8dp</dimen> + <dimen name="videocall_button_size">60dp</dimen> +</resources> diff --git a/java/com/android/incallui/video/impl/res/values/strings.xml b/java/com/android/incallui/video/impl/res/values/strings.xml new file mode 100644 index 000000000..2b72b8004 --- /dev/null +++ b/java/com/android/incallui/video/impl/res/values/strings.xml @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + + <!-- Text indicates the video from remote party is off. [CHAR LIMIT=40] --> + <string name="videocall_remote_video_off">Their video is off</string> + + <!-- Text indicates the video from remote party is on. [CHAR LIMIT=40] --> + <string name="videocall_remote_video_on">Their video is on</string> + + <!-- Text indicates the call is held by remote party. [CHAR LIMIT=20] --> + <string name="videocall_remotely_held">Call on hold</string> + + <!-- Text indicates the call is resumed from held by remote party. [CHAR LIMIT=20] --> + <string name="videocall_remotely_resumed">Call resumed</string> + + <!-- Title of dialog to ask user for camera permission. [CHAR LIMIT=30] --> + <string name="camera_permission_dialog_title">Allow video?</string> + + <!-- Message of dialog to ask user for camera permission. [CHAR LIMIT=100] --> + <string name="camera_permission_dialog_message">The Phone app wants to use your camera for video calls.</string> + + <!-- Text of button to be confirmed for camera permission by user. [CHAR LIMIT=20] --> + <string name="camera_permission_dialog_positive_button">Allow</string> + + <!-- Text of button to be declined for camera permission by user. [CHAR LIMIT=20] --> + <string name="camera_permission_dialog_negative_button">Deny</string> + +</resources> diff --git a/java/com/android/incallui/video/impl/res/values/styles.xml b/java/com/android/incallui/video/impl/res/values/styles.xml new file mode 100644 index 000000000..b94400875 --- /dev/null +++ b/java/com/android/incallui/video/impl/res/values/styles.xml @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="utf-8"?> +<resources> + + <style name="Incall.Button.VideoCall" parent="Widget.AppCompat.ImageButton"> + <item name="android:background">@drawable/videocall_video_button_background</item> + <item name="android:scaleType">center</item> + <item name="android:tint">@color/videocall_button_icon_tint</item> + <item name="android:tintMode">src_atop</item> + <item name="android:stateListAnimator">@animator/disabled_alpha</item> + </style> +</resources> |