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

Commit c157db04 authored by Danny Baumann's avatar Danny Baumann
Browse files

Fix translucent navigation bar layout on tablets in landscape.

The status bar blocker view was visible and stretched over the whole
navigation bar, even though it's not even needed on tablets, as the
status bar never extends into the navigation bar there. Fix that by
hiding the blocker view, but keep it in the layout in oder to not
clutter the code with null checks.

Also cleanup unneeded method override.

Change-Id: I50d58e6e3496516b37f8c36b497cf8c9f569325c
parent e2980fcf
Loading
Loading
Loading
Loading
+10 −7
Original line number Diff line number Diff line
@@ -117,6 +117,16 @@
            systemui:orientation="horizontal"
            android:layout_gravity="top"
            />

        <!-- The status bar area blocker is only really needed in phone configurations.
             In order to not clutter the code with null checks for it in the tablet case,
             add it as a dummy here as well. -->
        <View
            android:id="@+id/status_bar_blocker"
            android:layout_width="0dp"
            android:layout_height="0dp"
            android:visibility="gone"
            />
    </FrameLayout>

    <FrameLayout android:id="@+id/rot90"
@@ -218,13 +228,6 @@
            systemui:orientation="vertical"
            android:layout_gravity="top"
            />

        <View
            android:id="@+id/status_bar_blocker"
            android:layout_width="match_parent"
            android:layout_height="@*android:dimen/status_bar_height"
            android:alpha="0"
            />
    </FrameLayout>

    <!-- not used -->
+0 −5
Original line number Diff line number Diff line
@@ -1008,10 +1008,5 @@ public class NavigationBarView extends LinearLayout {
        public void init() {
            applyModeBackground(-1, getMode(), false /*animate*/);
        }

        @Override
        protected void onTransition(int oldMode, int newMode, boolean animate) {
            super.onTransition(oldMode, newMode, animate);
        }
    }
}