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

Commit 85c22de2 authored by Roman Birg's avatar Roman Birg Committed by Michael Bestas
Browse files

SystemUI: add left and right virtual buttons while typing



[cyanogen] refactor for cm-14.0
[LuK1337] update for 8.1
[sam3000] Updates for ten

* Removed keyRepeat attribute from layouts because it defaults to true
  and AOSP removed it anyway in commit 160ad6b2

* Removed layout-sw600dp layout changes because AOSP refactored to use
  layout instead as seen in commit aa94d95b

* Renamed rot90 layout suffix to vertical as per AOSP changes

[maniac103] More refactorings for ten

* Follow new system of inflating all views dynamically

Squashes the following commits:

Author: Danny Baumann <dannybaumann@web.de>
Date:   Wed Aug 6 09:16:35 2014 +0200

    Fix side button visibility tracking.

    Previously one could e.g. get legacy menu button being visible in
    certain scenarios, like this one:
    - Open legacy app, e.g. CatLog
    - Invoke IME
    - Lock screen
    - Unlock screen
    - Result: Menu button visible in keyguard

    Change-Id: Ia796f73ec995ea1cc34d38f8aefdbccda7be7565

Author: Roman Birg <roman@cyngn.com>
Date:   Wed Jul 2 09:31:23 2014 -0700

    SystemUI: fix up navigation cursor keyevent flags

    Volume cursor controls use slightly different flags to keep the cursor
    within the field. Match them in the SystemUI for consistent (and better)
    behavior.

    Change-Id: I56d597f111ec611b0ca24a10f30575401fa76d18
    Signed-off-by: default avatarRoman Birg <roman@cyngn.com>

Author: Roman Birg <roman@cyngn.com>
Date:   Thu Jul 3 12:04:40 2014 -0700

    SystemUI: fix up initial cursor down flags on nav bar

    We were using the regular flags for the initial ACTION_DOWN event so the
    FLAG_KEEP_TOUCH_MODE was not being passed and allowed the cursor to jump
    out of bounds slightly.

    Change-Id: I5b4d2a5e5e0ce562985fcc3b7b6fac8b4abc49da
    Signed-off-by: default avatarRoman Birg <roman@cyngn.com>

Author: LuK1337 <priv.luk@gmail.com>
Date:   Thu Apr 19 01:14:21 2018 +0200

    SystemUI: Fix navigation bar arrows visibility handling

    * Fixes issue where input events would be sent
      while dpad_group view was set to be invisible.

    Change-Id: Ie802e9c8157505a2ad706332f0b2fe715caf428c

Author: Bruno Martins <bgcngm@gmail.com>
Date:   Sun Apr 19 23:17:12 2020 +0100

    NavigationBarView: Fix cursor keys visibility with gestural mode enabled

    When gestural mode is enabled and the IME is being shown
    the cursor keys must be hidden, otherwise there's an overlap.

    Fixes: https://gitlab.com/LineageOS/issues/android/-/issues/1730
    Change-Id: I2f34810d7b137573360a140bbf267028363e6a28

Change-Id: Iea446443d33ff305765e47c86523b619676116ac
parent 38401af9
Loading
Loading
Loading
Loading
+26 −0
Original line number Diff line number Diff line
<!--
    Copyright (C) 2015 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="20dp"
        android:height="20dp"
        android:viewportWidth="24"
        android:viewportHeight="24"
        android:tint="?attr/colorControlNormal"
        android:autoMirrored="true">
    <path
        android:fillColor="?attr/singleToneColor"
        android:pathData="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6,-6z"/>
</vector>
+26 −0
Original line number Diff line number Diff line
<!--
    Copyright (C) 2015 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="20dp"
        android:height="20dp"
        android:viewportWidth="24"
        android:viewportHeight="24"
        android:tint="?attr/colorControlNormal"
        android:autoMirrored="true">
    <path
        android:fillColor="?attr/singleToneColor"
        android:pathData="M15.41 7.41L14 6l-6 6 6 6 1.41,-1.41L10.83 12z"/>
</vector>
+38 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2016 The CyanogenMod 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.
-->
<merge
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:systemui="http://schemas.android.com/apk/res-auto">

    <com.android.systemui.navigationbar.buttons.KeyButtonView
        android:id="@+id/dpad_left"
        android:layout_width="@dimen/navigation_extra_key_width"
        android:layout_height="match_parent"
        android:layout_gravity="start"
        systemui:keyCode="21"
        android:scaleType="center"
        android:contentDescription="@string/accessibility_dpad_left" />

    <com.android.systemui.navigationbar.buttons.KeyButtonView
        android:id="@+id/dpad_right"
        android:layout_width="@dimen/navigation_extra_key_width"
        android:layout_height="match_parent"
        android:layout_gravity="end"
        systemui:keyCode="22"
        android:scaleType="center"
        android:contentDescription="@string/accessibility_dpad_right" />

</merge>
+38 −0
Original line number Diff line number Diff line
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2016 The CyanogenMod 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.
-->
<merge
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:systemui="http://schemas.android.com/apk/res-auto">

    <com.android.systemui.navigationbar.buttons.KeyButtonView
        android:id="@+id/dpad_left"
        android:layout_width="match_parent"
        android:layout_height="@dimen/navigation_extra_key_width"
        android:layout_gravity="top"
        systemui:keyCode="21"
        android:scaleType="center"
        android:contentDescription="@string/accessibility_dpad_left" />

    <com.android.systemui.navigationbar.buttons.KeyButtonView
        android:id="@+id/dpad_right"
        android:layout_width="match_parent"
        android:layout_height="@dimen/navigation_extra_key_width"
        android:layout_gravity="bottom"
        systemui:keyCode="22"
        android:scaleType="center"
        android:contentDescription="@string/accessibility_dpad_right" />

</merge>
+6 −0
Original line number Diff line number Diff line
@@ -53,6 +53,12 @@
            android:clipToPadding="false"
            android:clipChildren="false" />

        <FrameLayout
            android:id="@+id/dpad_group"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:clipChildren="false" />

    </com.android.systemui.navigationbar.buttons.NearestTouchFrame>

</FrameLayout>
Loading