Remove divider between QSFooter and media
Also, set gap between QSFooterView (or QSSecurityFooter) and media to 8dp. Fixes: 187316973 Test: manual Change-Id: Ie0ab67ac298951f749025d6699d302c27b0e6a80
This commit is contained in:
@@ -1,7 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<View xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="1dp"
|
||||
android:layout_marginBottom="16dp"
|
||||
android:background="@color/media_divider">
|
||||
</View>
|
||||
@@ -22,6 +22,7 @@
|
||||
android:layout_height="@dimen/qs_footer_height"
|
||||
android:layout_marginStart="@dimen/qs_footer_margin"
|
||||
android:layout_marginEnd="@dimen/qs_footer_margin"
|
||||
android:layout_marginBottom="@dimen/qs_footers_margin_bottom"
|
||||
android:background="@android:color/transparent"
|
||||
android:baselineAligned="false"
|
||||
android:clickable="false"
|
||||
|
||||
@@ -42,8 +42,6 @@
|
||||
android:clipToPadding="false"
|
||||
android:clipChildren="false">
|
||||
<include layout="@layout/qs_footer_impl" />
|
||||
<include layout="@layout/qs_media_divider"
|
||||
android:id="@+id/divider"/>
|
||||
</com.android.systemui.qs.QSPanel>
|
||||
</com.android.systemui.qs.NonInterceptingScrollView>
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
android:padding="@dimen/qs_footer_padding"
|
||||
android:gravity="center_vertical"
|
||||
android:layout_gravity="center_vertical|center_horizontal"
|
||||
android:layout_marginVertical="@dimen/qs_security_footer_vertical_margin"
|
||||
android:layout_marginBottom="@dimen/qs_footers_margin_bottom"
|
||||
android:background="@drawable/qs_security_footer_background"
|
||||
systemui:singleLineHeight="@dimen/qs_security_footer_single_line_height"
|
||||
systemui:textViewId="@id/footer_text"
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
<dimen name="qs_security_footer_single_line_height">@*android:dimen/quick_qs_offset_height</dimen>
|
||||
<dimen name="qs_footer_padding">14dp</dimen>
|
||||
<dimen name="qs_security_footer_vertical_margin">0dp</dimen>
|
||||
<dimen name="qs_footers_margin_bottom">0dp</dimen>
|
||||
<dimen name="qs_security_footer_background_inset">12dp</dimen>
|
||||
<dimen name="qs_security_footer_corner_radius">28dp</dimen>
|
||||
|
||||
|
||||
@@ -255,7 +255,6 @@
|
||||
<!-- media -->
|
||||
<color name="media_disabled">#80ffffff</color>
|
||||
<color name="media_seamless_border">?android:attr/colorAccent</color>
|
||||
<color name="media_divider">#1d000000</color>
|
||||
|
||||
<!-- controls -->
|
||||
<color name="control_primary_text">#E6FFFFFF</color>
|
||||
|
||||
@@ -616,7 +616,7 @@
|
||||
<dimen name="qs_footer_padding">20dp</dimen>
|
||||
<dimen name="qs_security_footer_height">88dp</dimen>
|
||||
<dimen name="qs_security_footer_single_line_height">48dp</dimen>
|
||||
<dimen name="qs_security_footer_vertical_margin">8dp</dimen>
|
||||
<dimen name="qs_footers_margin_bottom">8dp</dimen>
|
||||
<dimen name="qs_security_footer_background_inset">0dp</dimen>
|
||||
<dimen name="qs_security_footer_corner_radius">28dp</dimen>
|
||||
|
||||
|
||||
@@ -398,14 +398,8 @@ public class QSAnimator implements Callback, PageListener, Listener, OnLayoutCha
|
||||
// Fade in the security footer and the divider as we reach the final position
|
||||
builder = new Builder().setStartDelay(EXPANDED_TILE_DELAY);
|
||||
builder.addFloat(mSecurityFooter.getView(), "alpha", 0, 1);
|
||||
if (mQsPanelController.getDivider() != null) {
|
||||
builder.addFloat(mQsPanelController.getDivider(), "alpha", 0, 1);
|
||||
}
|
||||
mAllPagesDelayedAnimator = builder.build();
|
||||
mAllViews.add(mSecurityFooter.getView());
|
||||
if (mQsPanelController.getDivider() != null) {
|
||||
mAllViews.add(mQsPanelController.getDivider());
|
||||
}
|
||||
translationYBuilder.setInterpolator(mQSExpansionPathInterpolator.getYInterpolator());
|
||||
mTranslationYAnimator = translationYBuilder.build();
|
||||
if (mQQSTileHeightAnimator != null) {
|
||||
|
||||
@@ -167,6 +167,9 @@ public class QSFooterView extends FrameLayout {
|
||||
|
||||
private void updateResources() {
|
||||
updateFooterAnimator();
|
||||
MarginLayoutParams lp = (MarginLayoutParams) getLayoutParams();
|
||||
lp.bottomMargin = getResources().getDimensionPixelSize(R.dimen.qs_footers_margin_bottom);
|
||||
setLayoutParams(lp);
|
||||
mTunerIconTranslation = mContext.getResources()
|
||||
.getDimensionPixelOffset(R.dimen.qs_footer_tuner_icon_translation);
|
||||
mTunerIcon.setTranslationX(isLayoutRtl() ? -mTunerIconTranslation : mTunerIconTranslation);
|
||||
|
||||
@@ -84,8 +84,6 @@ public class QSPanel extends LinearLayout implements Tunable {
|
||||
|
||||
@Nullable
|
||||
protected View mFooter;
|
||||
@Nullable
|
||||
protected View mDivider;
|
||||
|
||||
@Nullable
|
||||
private ViewGroup mHeaderContainer;
|
||||
@@ -327,7 +325,6 @@ public class QSPanel extends LinearLayout implements Tunable {
|
||||
protected void onFinishInflate() {
|
||||
super.onFinishInflate();
|
||||
mFooter = findViewById(R.id.qs_footer);
|
||||
mDivider = findViewById(R.id.divider);
|
||||
}
|
||||
|
||||
private void updateHorizontalLinearLayoutMargins() {
|
||||
@@ -602,11 +599,6 @@ public class QSPanel extends LinearLayout implements Tunable {
|
||||
return mTileLayout;
|
||||
}
|
||||
|
||||
@Nullable
|
||||
public View getDivider() {
|
||||
return mDivider;
|
||||
}
|
||||
|
||||
/** */
|
||||
public void setContentMargins(int startMargin, int endMargin, ViewGroup mediaHostView) {
|
||||
// Only some views actually want this content padding, others want to go all the way
|
||||
@@ -614,12 +606,6 @@ public class QSPanel extends LinearLayout implements Tunable {
|
||||
mContentMarginStart = startMargin;
|
||||
mContentMarginEnd = endMargin;
|
||||
updateMediaHostContentMargins(mediaHostView);
|
||||
updateDividerMargin();
|
||||
}
|
||||
|
||||
private void updateDividerMargin() {
|
||||
if (mDivider == null) return;
|
||||
updateMargins(mDivider, mContentMarginStart, mContentMarginEnd);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -712,7 +698,6 @@ public class QSPanel extends LinearLayout implements Tunable {
|
||||
}
|
||||
|
||||
private void updateMargins(ViewGroup mediaHostView) {
|
||||
updateDividerMargin();
|
||||
updateMediaHostContentMargins(mediaHostView);
|
||||
updateHorizontalLinearLayoutMargins();
|
||||
updatePadding();
|
||||
|
||||
@@ -284,10 +284,6 @@ public class QSPanelController extends QSPanelControllerBase<QSPanel> {
|
||||
return mView.getBrightnessView();
|
||||
}
|
||||
|
||||
public View getDivider() {
|
||||
return mView.getDivider();
|
||||
}
|
||||
|
||||
/** */
|
||||
public void setPageListener(PagedTileLayout.PageListener listener) {
|
||||
mView.setPageListener(listener);
|
||||
|
||||
@@ -22,7 +22,6 @@ import static com.android.systemui.qs.dagger.QSFragmentModule.QS_USING_MEDIA_PLA
|
||||
import android.content.ComponentName;
|
||||
import android.content.res.Configuration;
|
||||
import android.metrics.LogMaker;
|
||||
import android.view.View;
|
||||
|
||||
import com.android.internal.logging.MetricsLogger;
|
||||
import com.android.internal.logging.UiEventLogger;
|
||||
@@ -294,13 +293,6 @@ public abstract class QSPanelControllerBase<T extends QSPanel> extends ViewContr
|
||||
boolean switchTileLayout(boolean force) {
|
||||
/** Whether or not the QuickQSPanel currently contains a media player. */
|
||||
boolean horizontal = shouldUseHorizontalLayout();
|
||||
if (mView.getDivider() != null) {
|
||||
if (!horizontal && mUsingMediaPlayer && mMediaHost.getVisible()) {
|
||||
mView.getDivider().setVisibility(View.VISIBLE);
|
||||
} else {
|
||||
mView.getDivider().setVisibility(View.GONE);
|
||||
}
|
||||
}
|
||||
if (horizontal != mUsingHorizontalLayout || force) {
|
||||
mUsingHorizontalLayout = horizontal;
|
||||
for (QSPanelControllerBase.TileRecord record : mRecords) {
|
||||
|
||||
@@ -128,11 +128,10 @@ class QSSecurityFooter implements OnClickListener, DialogInterface.OnClickListen
|
||||
int padding = r.getDimensionPixelSize(R.dimen.qs_footer_padding);
|
||||
mRootView.setPaddingRelative(padding, padding, padding, padding);
|
||||
|
||||
int verticalMargin = r.getDimensionPixelSize(R.dimen.qs_security_footer_vertical_margin);
|
||||
int bottomMargin = r.getDimensionPixelSize(R.dimen.qs_footers_margin_bottom);
|
||||
ViewGroup.MarginLayoutParams lp =
|
||||
(ViewGroup.MarginLayoutParams) mRootView.getLayoutParams();
|
||||
lp.topMargin = verticalMargin;
|
||||
lp.bottomMargin = verticalMargin;
|
||||
lp.bottomMargin = bottomMargin;
|
||||
lp.width = r.getConfiguration().orientation == Configuration.ORIENTATION_PORTRAIT
|
||||
? MATCH_PARENT : WRAP_CONTENT;
|
||||
mRootView.setLayoutParams(lp);
|
||||
|
||||
Reference in New Issue
Block a user