Merge "QS Edit: Hide black bar in landscape" into nyc-dev
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user