Merge "Remove top padding only if illustration is present" into nyc-dev

This commit is contained in:
Maurice Lam
2016-05-02 17:58:10 +00:00
committed by Android (Google) Code Review

View File

@@ -35,6 +35,7 @@ import android.widget.TextView;
import com.android.settings.R; import com.android.settings.R;
import com.android.setupwizardlib.SetupWizardLayout; import com.android.setupwizardlib.SetupWizardLayout;
import com.android.setupwizardlib.view.Illustration;
import java.text.NumberFormat; import java.text.NumberFormat;
import java.util.List; import java.util.List;
@@ -119,11 +120,13 @@ public abstract class StorageWizardBase extends Activity {
scrollView.setVerticalFadingEdgeEnabled(true); scrollView.setVerticalFadingEdgeEnabled(true);
scrollView.setFadingEdgeLength(scrollView.getVerticalFadingEdgeLength() * 2); scrollView.setFadingEdgeLength(scrollView.getVerticalFadingEdgeLength() * 2);
// Our header assets already have padding baked in if (findViewById(R.id.suw_layout_decor) instanceof Illustration) {
// Our header illustration already have padding baked in
final View title = findViewById(R.id.suw_layout_title); final View title = findViewById(R.id.suw_layout_title);
title.setPadding(title.getPaddingLeft(), 0, title.getPaddingRight(), title.setPadding(title.getPaddingLeft(), 0, title.getPaddingRight(),
title.getPaddingBottom()); title.getPaddingBottom());
} }
}
@Override @Override
protected void onDestroy() { protected void onDestroy() {