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

am: 0e4816efb9

* commit '0e4816efb99e28a25efecee1702c552bfb9ba849':
  Remove top padding only if illustration is present

Change-Id: Ice07c970200be51a0b8447a1cfcaf59eac4e8142
This commit is contained in:
Maurice Lam
2016-05-02 18:05:23 +00:00
committed by android-build-merger

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,10 +120,12 @@ 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) {
final View title = findViewById(R.id.suw_layout_title); // Our header illustration already have padding baked in
title.setPadding(title.getPaddingLeft(), 0, title.getPaddingRight(), final View title = findViewById(R.id.suw_layout_title);
title.getPaddingBottom()); title.setPadding(title.getPaddingLeft(), 0, title.getPaddingRight(),
title.getPaddingBottom());
}
} }
@Override @Override