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

Commit be195ae4 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

* commit '630436c9':
  QS Edit: Hide black bar in landscape

Change-Id: I1691d9911b646f93c1fecab0cdb03506b4c357cb
parents 08305d71 630436c9
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();