Remove QS Gutter

Test: manual
Change-Id: I10be3dfc9b9745f25b8fec3ef1f5d812441890ad
Fixes: 62234983
This commit is contained in:
Jason Monk
2017-06-02 12:50:24 -04:00
parent f74752293d
commit 232ac2b8d2
8 changed files with 7 additions and 56 deletions

View File

@@ -21,7 +21,6 @@
android:layout_width="match_parent"
android:layout_height="0dp"
android:orientation="vertical"
android:elevation="4dp"
android:background="@drawable/qs_customizer_background"
android:gravity="center_horizontal">

View File

@@ -20,7 +20,6 @@
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/qs_detail_background"
android:elevation="4dp"
android:clickable="true"
android:orientation="vertical"
android:paddingBottom="8dp"

View File

@@ -21,13 +21,11 @@
android:id="@+id/header"
android:layout_width="match_parent"
android:layout_height="48dp"
android:elevation="4dp"
android:baselineAligned="false"
android:clickable="false"
android:clipChildren="false"
android:clipToPadding="false"
android:paddingTop="0dp"
android:background="#00000000"
android:gravity="center_vertical"
android:orientation="horizontal">
@@ -116,9 +114,4 @@
android:padding="14dp" />
</LinearLayout>
<include layout="@layout/qs_divider"
android:layout_width="match_parent"
android:layout_height="1dp"
android:layout_gravity="bottom" />
</com.android.systemui.qs.QSFooter>

View File

@@ -18,24 +18,16 @@
android:id="@+id/quick_settings_container"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@drawable/qs_background_primary"
android:elevation="4dp"
android:clipToPadding="false"
android:clipChildren="false">
<View
android:id="@+id/qs_background"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/qs_background_primary"
android:alpha="0.8"
android:elevation="4dp" />
<com.android.systemui.qs.QSPanel
android:id="@+id/quick_settings_panel"
android:layout_marginTop="28dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:elevation="4dp"
android:background="#00000000"
android:layout_marginBottom="48dp" />
<include layout="@layout/quick_status_bar_expanded_header" />

View File

@@ -24,8 +24,6 @@
android:layout_height="@dimen/status_bar_header_height"
android:layout_gravity="@integer/notification_panel_layout_gravity"
android:baselineAligned="false"
android:background="#00000000"
android:elevation="4dp"
android:clickable="false"
android:clipChildren="false"
android:clipToPadding="false"

View File

@@ -813,8 +813,6 @@
<dimen name="rounded_corner_radius">0dp</dimen>
<dimen name="rounded_corner_content_padding">0dp</dimen>
<dimen name="qs_gutter_height">6dp</dimen>
<!-- Intended corner radius when drawing the mobile signal -->
<dimen name="stat_sys_mobile_signal_corner_radius">0.75dp</dimen>

View File

@@ -39,8 +39,6 @@ public class QSContainerImpl extends FrameLayout {
protected float mQsExpansion;
private QSCustomizer mQSCustomizer;
private QSFooter mQSFooter;
private int mGutterHeight;
private View mBackground;
private float mFullElevation;
public QSContainerImpl(Context context, AttributeSet attrs) {
@@ -55,8 +53,6 @@ public class QSContainerImpl extends FrameLayout {
mHeader = findViewById(R.id.header);
mQSCustomizer = findViewById(R.id.qs_customize);
mQSFooter = findViewById(R.id.qs_footer);
mBackground = findViewById(R.id.qs_background);
mGutterHeight = getContext().getResources().getDimensionPixelSize(R.dimen.qs_gutter_height);
mFullElevation = mQSPanel.getElevation();
setClickable(true);
@@ -110,18 +106,10 @@ public class QSContainerImpl extends FrameLayout {
public void updateExpansion() {
int height = calculateContainerHeight();
int gutterHeight = Math.round(mQsExpansion * mGutterHeight);
setBottom(getTop() + height + gutterHeight);
setBottom(getTop() + height);
mQSDetail.setBottom(getTop() + height);
mBackground.setBottom(getTop() + height);
// Pin QS Footer to the bottom of the panel.
mQSFooter.setTranslationY(height - mQSFooter.getHeight());
float elevation = mQsExpansion * mFullElevation;
mQSDetail.setElevation(elevation);
mBackground.setElevation(elevation);
mQSFooter.setElevation(elevation);
mQSPanel.setElevation(elevation);
}
protected int calculateContainerHeight() {
@@ -135,17 +123,4 @@ public class QSContainerImpl extends FrameLayout {
mQsExpansion = expansion;
updateExpansion();
}
public void setGutterEnabled(boolean gutterEnabled) {
if (gutterEnabled == (mGutterHeight != 0)) {
return;
}
if (gutterEnabled) {
mGutterHeight = getContext().getResources().getDimensionPixelSize(
R.dimen.qs_gutter_height);
} else {
mGutterHeight = 0;
}
updateExpansion();
}
}

View File

@@ -63,7 +63,6 @@ public class QSFragment extends Fragment implements QS {
private QSContainerImpl mContainer;
private int mLayoutDirection;
private QSFooter mFooter;
private int mGutterHeight;
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container,
@@ -80,7 +79,6 @@ public class QSFragment extends Fragment implements QS {
mHeader = view.findViewById(R.id.header);
mFooter = view.findViewById(R.id.qs_footer);
mContainer = view.findViewById(id.quick_settings_container);
mGutterHeight = getContext().getResources().getDimensionPixelSize(R.dimen.qs_gutter_height);
mQSDetail.setQsPanel(mQSPanel, mHeader);
@@ -131,7 +129,6 @@ public class QSFragment extends Fragment implements QS {
@Override
public void setHasNotifications(boolean hasNotifications) {
mContainer.setGutterEnabled(hasNotifications);
}
public void setPanelView(HeightListener panelView) {
@@ -250,7 +247,7 @@ public class QSFragment extends Fragment implements QS {
mContainer.setExpansion(expansion);
final float translationScaleY = expansion - 1;
if (!mHeaderAnimating) {
int height = mHeader.getHeight() + mGutterHeight;
int height = mHeader.getHeight();
getView().setTranslationY(mKeyguardShowing ? (translationScaleY * height)
: headerTranslation);
}
@@ -333,15 +330,15 @@ public class QSFragment extends Fragment implements QS {
LayoutParams layoutParams = (LayoutParams) mQSPanel.getLayoutParams();
int panelHeight = layoutParams.topMargin + layoutParams.bottomMargin +
+ mQSPanel.getMeasuredHeight();
return panelHeight + getView().getPaddingBottom() + mGutterHeight;
return panelHeight + getView().getPaddingBottom();
} else {
return getView().getMeasuredHeight() + mGutterHeight;
return getView().getMeasuredHeight();
}
}
@Override
public void setHeightOverride(int desiredHeight) {
mContainer.setHeightOverride(desiredHeight - mGutterHeight);
mContainer.setHeightOverride(desiredHeight);
}
public int getQsMinExpansionHeight() {