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

Commit b64ad563 authored by Jason Monk's avatar Jason Monk Committed by android-build-merger
Browse files

Merge "QS Edit: Hide black bar in landscape" into nyc-dev am: 630436c9

am: be195ae4

* commit 'be195ae4':
  QS Edit: Hide black bar in landscape

Change-Id: Ida6200fe3a6bfa45c154b8b0ae382e6ee337988c
parents 44196ce2 be195ae4
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@
        android:importantForAccessibility="no" />

    <View
        android:id="@+id/nav_bar_background"
        android:layout_width="match_parent"
        android:layout_height="@dimen/navigation_bar_size"
        android:layout_gravity="bottom"
+12 −0
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@ import android.animation.Animator;
import android.animation.Animator.AnimatorListener;
import android.animation.AnimatorListenerAdapter;
import android.content.Context;
import android.content.res.Configuration;
import android.support.v7.widget.DefaultItemAnimator;
import android.support.v7.widget.GridLayoutManager;
import android.support.v7.widget.RecyclerView;
@@ -103,6 +104,17 @@ public class QSCustomizer extends LinearLayout implements OnMenuItemClickListene
        mRecyclerView.setItemAnimator(animator);
    }

    @Override
    protected void onConfigurationChanged(Configuration newConfig) {
        super.onConfigurationChanged(newConfig);
        View navBackdrop = findViewById(R.id.nav_bar_background);
        if (navBackdrop != null) {
            boolean shouldShow = newConfig.smallestScreenWidthDp >= 600
                    || newConfig.orientation != Configuration.ORIENTATION_LANDSCAPE;
            navBackdrop.setVisibility(shouldShow ? View.VISIBLE : View.GONE);
        }
    }

    public void setHost(QSTileHost host) {
        mHost = host;
        mPhoneStatusBar = host.getPhoneStatusBar();