diff options
Diffstat (limited to 'java/com/android/incallui/video')
15 files changed, 449 insertions, 120 deletions
diff --git a/java/com/android/incallui/video/impl/SurfaceViewVideoCallFragment.java b/java/com/android/incallui/video/impl/SurfaceViewVideoCallFragment.java index a65274276..29aea1459 100644 --- a/java/com/android/incallui/video/impl/SurfaceViewVideoCallFragment.java +++ b/java/com/android/incallui/video/impl/SurfaceViewVideoCallFragment.java @@ -184,13 +184,7 @@ public class SurfaceViewVideoCallFragment extends Fragment LayoutInflater layoutInflater, @Nullable ViewGroup viewGroup, @Nullable Bundle bundle) { LogUtil.i("SurfaceViewVideoCallFragment.onCreateView", null); - View view = - layoutInflater.inflate( - isLandscape() - ? R.layout.frag_videocall_land_surfaceview - : R.layout.frag_videocall_surfaceview, - viewGroup, - false); + View view = layoutInflater.inflate(R.layout.frag_videocall_surfaceview, viewGroup, false); contactGridManager = new ContactGridManager(view, null /* no avatar */, 0, false /* showAnonymousAvatar */); @@ -639,12 +633,6 @@ public class SurfaceViewVideoCallFragment extends Fragment shouldShowPreview, shouldShowRemote); - if (this.shouldShowPreview == shouldShowPreview - && this.shouldShowRemote == shouldShowRemote - && this.isRemotelyHeld == isRemotelyHeld) { - return; - } - this.shouldShowPreview = shouldShowPreview; this.shouldShowRemote = shouldShowRemote; this.isRemotelyHeld = isRemotelyHeld; diff --git a/java/com/android/incallui/video/impl/VideoCallFragment.java b/java/com/android/incallui/video/impl/VideoCallFragment.java index 96059375f..97d38cf3d 100644 --- a/java/com/android/incallui/video/impl/VideoCallFragment.java +++ b/java/com/android/incallui/video/impl/VideoCallFragment.java @@ -1216,6 +1216,9 @@ public class VideoCallFragment extends Fragment blurScript.setInput(allocationIn); blurScript.forEach(allocationOut); allocationOut.copyTo(image); + blurScript.destroy(); + allocationIn.destroy(); + allocationOut.destroy(); } @Override diff --git a/java/com/android/incallui/video/impl/res/layout-land/videocall_controls_surfaceview.xml b/java/com/android/incallui/video/impl/res/layout-land/videocall_controls_surfaceview.xml new file mode 100644 index 000000000..40b50bc70 --- /dev/null +++ b/java/com/android/incallui/video/impl/res/layout-land/videocall_controls_surfaceview.xml @@ -0,0 +1,129 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2017 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 + --> +<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_long" + 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"/> + +</RelativeLayout> diff --git a/java/com/android/incallui/video/impl/res/layout/frag_videocall_land_surfaceview.xml b/java/com/android/incallui/video/impl/res/layout/frag_videocall_land_surfaceview.xml deleted file mode 100644 index 4cafd68c6..000000000 --- a/java/com/android/incallui/video/impl/res/layout/frag_videocall_land_surfaceview.xml +++ /dev/null @@ -1,93 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<FrameLayout 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:keepScreenOn="true"> - - <SurfaceView - android:id="@+id/videocall_video_remote" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:importantForAccessibility="no"/> - - <TextView - android:gravity="center" - android:id="@+id/videocall_remote_video_off" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center" - 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:background="@color/videocall_overlay_background_color"/> - - <FrameLayout - android:id="@+id/videocall_preview_root" - android:layout_width="@dimen/videocall_preview_width" - android:layout_height="@dimen/videocall_preview_height" - android:layout_marginBottom="@dimen/videocall_preview_margin_bottom" - android:layout_marginEnd="@dimen/videocall_preview_margin_end" - android:background="@android:color/black" - android:layout_gravity="bottom|end"> - - <SurfaceView - android:id="@+id/videocall_video_preview" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:importantForAccessibility="no"/> - - <ImageView - android:id="@+id/videocall_video_preview_off_overlay" - android:layout_width="wrap_content" - android:layout_height="wrap_content" - android:layout_gravity="center" - 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_gravity="center" - 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"/> - - </FrameLayout> - - <View - android:id="@+id/videocall_green_screen_background" - android:layout_width="match_parent" - android:layout_height="match_parent" - android:background="@color/videocall_overlay_background_color"/> - - <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"/> - -</FrameLayout> diff --git a/java/com/android/incallui/video/impl/res/layout/frag_videocall_surfaceview.xml b/java/com/android/incallui/video/impl/res/layout/frag_videocall_surfaceview.xml index fa4aaef1c..c67246675 100644 --- a/java/com/android/incallui/video/impl/res/layout/frag_videocall_surfaceview.xml +++ b/java/com/android/incallui/video/impl/res/layout/frag_videocall_surfaceview.xml @@ -1,10 +1,24 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2017 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 + --> <FrameLayout 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" android:keepScreenOn="true"> <SurfaceView @@ -33,17 +47,11 @@ android:id="@+id/videocall_fullscreen_background" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="@color/videocall_overlay_background_color" - tools:visibility="gone"/> + android:background="@color/videocall_overlay_background_color"/> <FrameLayout - android:id="@+id/videocall_preview_root" - 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:background="@android:color/black" - android:layout_gravity="bottom|start"> + style="@style/VideoPreviewHolder" + android:id="@+id/videocall_preview_root"> <SurfaceView android:id="@+id/videocall_video_preview" @@ -81,11 +89,10 @@ android:id="@+id/videocall_green_screen_background" android:layout_width="match_parent" android:layout_height="match_parent" - android:background="@color/videocall_overlay_background_color" - tools:visibility="gone"/> + android:background="@color/videocall_overlay_background_color"/> <include - layout="@layout/videocall_controls" + layout="@layout/videocall_controls_surfaceview" android:layout_width="match_parent" android:layout_height="match_parent"/> diff --git a/java/com/android/incallui/video/impl/res/layout/videocall_controls_surfaceview.xml b/java/com/android/incallui/video/impl/res/layout/videocall_controls_surfaceview.xml new file mode 100644 index 000000000..d2dc992b7 --- /dev/null +++ b/java/com/android/incallui/video/impl/res/layout/videocall_controls_surfaceview.xml @@ -0,0 +1,130 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2017 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 + --> +<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_long" + 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: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_marginBottom="@dimen/videocall_button_spacing" + 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_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/values-b+sr+Latn/strings.xml b/java/com/android/incallui/video/impl/res/values-b+sr+Latn/strings.xml new file mode 100644 index 000000000..5381ecc68 --- /dev/null +++ b/java/com/android/incallui/video/impl/res/values-b+sr+Latn/strings.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<resources xmlns:android="http://schemas.android.com/apk/res/android" + xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2"> + <string name="videocall_remote_video_off" msgid="2959680546745902547">"Video je isključen"</string> + <string name="videocall_remote_video_on" msgid="6011817851703181639">"Kamera ove osobe je uključena"</string> + <string name="videocall_remotely_held" msgid="1295702896355732947">"Poziv je na čekanju"</string> + <string name="videocall_remotely_resumed" msgid="3331784411244773788">"Poziv je nastavljen"</string> + <string name="camera_permission_dialog_title" msgid="4901760354830982117">"Želite da dozvolite video?"</string> + <string name="camera_permission_dialog_message" msgid="2677490854794162699">"Aplikacija Telefon želi da koristi vašu kameru za video pozive."</string> + <string name="camera_permission_dialog_positive_button" msgid="9075818030671161374">"Dozvoli"</string> + <string name="camera_permission_dialog_negative_button" msgid="7538535842403837541">"Odbij"</string> +</resources> diff --git a/java/com/android/incallui/video/impl/res/values-h580dp-land/dimens.xml b/java/com/android/incallui/video/impl/res/values-h580dp-land/dimens.xml new file mode 100644 index 000000000..ac2d0316a --- /dev/null +++ b/java/com/android/incallui/video/impl/res/values-h580dp-land/dimens.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2017 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 + --> +<resources> + <dimen name="videocall_preview_long">116dp</dimen> +</resources> 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 index b1a86a0fa..a53fb6404 100644 --- a/java/com/android/incallui/video/impl/res/values-h580dp/dimens.xml +++ b/java/com/android/incallui/video/impl/res/values-h580dp/dimens.xml @@ -1,7 +1,23 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2017 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 + --> <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> + <dimen name="videocall_preview_long">104dp</dimen> </resources> diff --git a/java/com/android/incallui/video/impl/res/values-land/dimens.xml b/java/com/android/incallui/video/impl/res/values-land/dimens.xml new file mode 100644 index 000000000..6485735e2 --- /dev/null +++ b/java/com/android/incallui/video/impl/res/values-land/dimens.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2017 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 + --> +<resources> + <dimen name="videocall_preview_long">92dp</dimen> +</resources> diff --git a/java/com/android/incallui/video/impl/res/values-land/styles.xml b/java/com/android/incallui/video/impl/res/values-land/styles.xml new file mode 100644 index 000000000..a809708df --- /dev/null +++ b/java/com/android/incallui/video/impl/res/values-land/styles.xml @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2017 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 + --> +<resources> + <style name="VideoPreviewHolder"> + <item name="android:layout_gravity">bottom|end</item> + <item name="android:layout_width">@dimen/videocall_preview_long</item> + <item name="android:layout_height">@dimen/videocall_preview_height</item> + <item name="android:layout_marginBottom">@dimen/videocall_preview_margin_bottom</item> + <item name="android:layout_marginEnd">@dimen/videocall_preview_margin_end</item> + <item name="android:background">@android:color/black</item> + </style> +</resources> diff --git a/java/com/android/incallui/video/impl/res/values-w460dp-land/dimens.xml b/java/com/android/incallui/video/impl/res/values-w460dp-land/dimens.xml new file mode 100644 index 000000000..ac2d0316a --- /dev/null +++ b/java/com/android/incallui/video/impl/res/values-w460dp-land/dimens.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2017 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 + --> +<resources> + <dimen name="videocall_preview_long">116dp</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 index b1a86a0fa..a53fb6404 100644 --- a/java/com/android/incallui/video/impl/res/values-w460dp/dimens.xml +++ b/java/com/android/incallui/video/impl/res/values-w460dp/dimens.xml @@ -1,7 +1,23 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2017 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 + --> <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> + <dimen name="videocall_preview_long">104dp</dimen> </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 index 45860036f..aa08c9d6d 100644 --- a/java/com/android/incallui/video/impl/res/values/dimens.xml +++ b/java/com/android/incallui/video/impl/res/values/dimens.xml @@ -1,7 +1,23 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2017 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 + --> <resources> <dimen name="videocall_preview_width">72dp</dimen> <dimen name="videocall_preview_height">72dp</dimen> + <dimen name="videocall_preview_long">84dp</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> diff --git a/java/com/android/incallui/video/impl/res/values/styles.xml b/java/com/android/incallui/video/impl/res/values/styles.xml index b94400875..f73075f09 100644 --- a/java/com/android/incallui/video/impl/res/values/styles.xml +++ b/java/com/android/incallui/video/impl/res/values/styles.xml @@ -1,6 +1,20 @@ <?xml version="1.0" encoding="utf-8"?> +<!-- + ~ Copyright (C) 2017 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 + --> <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> @@ -8,4 +22,12 @@ <item name="android:tintMode">src_atop</item> <item name="android:stateListAnimator">@animator/disabled_alpha</item> </style> + <style name="VideoPreviewHolder"> + <item name="android:layout_gravity">bottom|start</item> + <item name="android:layout_width">@dimen/videocall_preview_width</item> + <item name="android:layout_height">@dimen/videocall_preview_long</item> + <item name="android:layout_marginBottom">@dimen/videocall_preview_margin_bottom</item> + <item name="android:layout_marginStart">@dimen/videocall_preview_margin_start</item> + <item name="android:background">@android:color/black</item> + </style> </resources> |