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

Commit 67fa37f0 authored by h3.choi -'s avatar h3.choi - Committed by Tyler Freeman
Browse files

feat(#MagnificationThumbnail): add thumbnail view to FullScreenMagnification.

This shows a little preview of the magnification area in the corner
whenever you pan the magnifier.

Fix: 231387403
Test: atest frameworks/base/services/tests/servicestests/src/com/android/server/accessibility/magnification/MagnificationThumbnailTest.java \
   && atest frameworks/base/services/tests/servicestests/src/com/android/server/accessibility/magnification/FullScreenMagnificationControllerTest.java

Change-Id: I210e7f7feb9e12357812e631b813e10129ed6758
parent 820837c1
Loading
Loading
Loading
Loading
+26 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2023 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.
-->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
    <shape android:shape="rectangle">
        <stroke
            android:width="1dp"
            android:color="@color/accessibility_magnification_thumbnail_stroke_color" />
        <corners android:radius="4dp"/>
        <solid android:color="@color/accessibility_magnification_thumbnail_background_color" />
    </shape>
</item>
</layer-list>
+23 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2023 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.
-->
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
    <shape android:shape="rectangle">
        <corners android:radius="2dp"/>
        <solid android:color="@color/accessibility_magnification_thumbnail_color" />
    </shape>
</item>
</layer-list>
+26 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2023 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"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:background="@drawable/accessibility_magnification_thumbnail_background_bg">
    <View
        android:id="@+id/accessibility_magnification_thumbnail_view"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:background="@drawable/accessibility_magnification_thumbnail_bg">
    </View>
</FrameLayout>
 No newline at end of file
+5 −0
Original line number Diff line number Diff line
@@ -556,6 +556,11 @@
    <color name="accessibility_daltonizer_background">#00BCD4</color>
    <color name="accessibility_color_inversion_background">#546E7A</color>

    <!-- Fullscreen magnification thumbnail color -->
    <color name="accessibility_magnification_thumbnail_stroke_color">#E0E0E0</color>
    <color name="accessibility_magnification_thumbnail_background_color">#FCFCFC</color>
    <color name="accessibility_magnification_thumbnail_color">#252525</color>

    <!-- Color of camera light when camera is in use -->
    <color name="camera_privacy_light_day">#FFFFFF</color>
    <color name="camera_privacy_light_night">#FFFFFF</color>
+3 −0
Original line number Diff line number Diff line
@@ -606,6 +606,9 @@
    <!-- Width of the outline stroke used by the accessibility focus rectangle -->
    <dimen name="accessibility_focus_highlight_stroke_width">4dp</dimen>

    <!-- padding of fullscreen magnification thumbnail -->
    <dimen name="accessibility_magnification_thumbnail_padding">12dp</dimen>

    <!-- The padding ratio of the Accessibility icon foreground drawable -->
    <item name="accessibility_icon_foreground_padding_ratio" type="dimen">21.88%</item>

Loading