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

Commit 741aef12 authored by Galia Peycheva's avatar Galia Peycheva
Browse files

Add outline to tv pip menu arrows

In order to have an outline for the arrows, we draw them
programmatically instead of in xml with vector drawables.

This way, we can ensure that the Path for the drawable is
the same as the Path for the ViewOutlineProvider.

Bug: 220108601
Test: atest TvPipMenuController
Test: flash and check arrows are visible over white background

Change-Id: I965e9ac33f474012446b6f8096edf39d93a0c92e
parent 54f6fb6d
Loading
Loading
Loading
Loading
+0 −25
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2021 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.
  -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:width="24dp"
        android:height="24dp"
        android:viewportWidth="24"
        android:viewportHeight="24">
    <path
        android:fillColor="@color/tv_pip_menu_focus_border"
        android:pathData="M7,10l5,5 5,-5H7z"/>
</vector>
 No newline at end of file
+0 −25
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2021 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.
  -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:width="24dp"
        android:height="24dp"
        android:viewportWidth="24"
        android:viewportHeight="24">
    <path
        android:fillColor="@color/tv_pip_menu_focus_border"
        android:pathData="M14,7l-5,5 5,5V7z"/>
</vector>
 No newline at end of file
+0 −25
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2021 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.
  -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:width="24dp"
        android:height="24dp"
        android:viewportWidth="24"
        android:viewportHeight="24">
    <path
        android:fillColor="@color/tv_pip_menu_focus_border"
        android:pathData="M10,17l5,-5 -5,-5v10z"/>
</vector>
 No newline at end of file
+0 −25
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!--
  ~ Copyright (C) 2021 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.
  -->
<vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:width="24dp"
        android:height="24dp"
        android:viewportWidth="24"
        android:viewportHeight="24">
    <path
        android:fillColor="@color/tv_pip_menu_focus_border"
        android:pathData="M7,14l5,-5 5,5H7z"/>
</vector>
 No newline at end of file
+4 −12
Original line number Diff line number Diff line
@@ -104,9 +104,7 @@
        android:layout_centerHorizontal="true"
        android:layout_alignParentTop="true"
        android:alpha="0"
        android:contentDescription="@string/a11y_action_pip_move_up"
        android:elevation="@dimen/pip_menu_arrow_elevation"
        android:src="@drawable/pip_ic_move_up" />
        android:contentDescription="@string/a11y_action_pip_move_up"/>

    <ImageView
        android:id="@+id/tv_pip_menu_arrow_right"
@@ -115,9 +113,7 @@
        android:layout_centerVertical="true"
        android:layout_alignParentRight="true"
        android:alpha="0"
        android:contentDescription="@string/a11y_action_pip_move_right"
        android:elevation="@dimen/pip_menu_arrow_elevation"
        android:src="@drawable/pip_ic_move_right" />
        android:contentDescription="@string/a11y_action_pip_move_right"/>

    <ImageView
        android:id="@+id/tv_pip_menu_arrow_down"
@@ -126,9 +122,7 @@
        android:layout_centerHorizontal="true"
        android:layout_alignParentBottom="true"
        android:alpha="0"
        android:contentDescription="@string/a11y_action_pip_move_down"
        android:elevation="@dimen/pip_menu_arrow_elevation"
        android:src="@drawable/pip_ic_move_down" />
        android:contentDescription="@string/a11y_action_pip_move_down"/>

    <ImageView
        android:id="@+id/tv_pip_menu_arrow_left"
@@ -137,7 +131,5 @@
        android:layout_centerVertical="true"
        android:layout_alignParentLeft="true"
        android:alpha="0"
        android:contentDescription="@string/a11y_action_pip_move_left"
        android:elevation="@dimen/pip_menu_arrow_elevation"
        android:src="@drawable/pip_ic_move_left" />
        android:contentDescription="@string/a11y_action_pip_move_left"/>
</RelativeLayout>
Loading