Hide branding view when empty
It looks like the empty branding view was causing the underlying view to bleed through it so ensuring that it is removed if empty. Bug: 182708883 Change-Id: I868931768bed5b083433fd5222720724bfe3e60e
This commit is contained in:
@@ -200,14 +200,14 @@ public final class SplashScreenView extends FrameLayout {
|
||||
view.mParceledIconBitmap = mParceledIconBitmap;
|
||||
}
|
||||
// branding image
|
||||
if (mBrandingImageHeight > 0 && mBrandingImageWidth > 0) {
|
||||
if (mBrandingImageHeight > 0 && mBrandingImageWidth > 0 && mBrandingDrawable != null) {
|
||||
final ViewGroup.LayoutParams params = view.mBrandingImageView.getLayoutParams();
|
||||
params.width = mBrandingImageWidth;
|
||||
params.height = mBrandingImageHeight;
|
||||
view.mBrandingImageView.setLayoutParams(params);
|
||||
}
|
||||
if (mBrandingDrawable != null) {
|
||||
view.mBrandingImageView.setBackground(mBrandingDrawable);
|
||||
} else {
|
||||
view.mBrandingImageView.setVisibility(GONE);
|
||||
}
|
||||
if (mParceledBrandingBitmap != null) {
|
||||
view.mParceledBrandingBitmap = mParceledBrandingBitmap;
|
||||
|
||||
@@ -129,8 +129,8 @@ public class SplashscreenContentDrawer {
|
||||
} else if (attrs.mWindowBgResId != 0) {
|
||||
themeBGDrawable = context.getDrawable(attrs.mWindowBgResId);
|
||||
} else {
|
||||
Slog.w(TAG, "Window background not exist!");
|
||||
themeBGDrawable = createDefaultBackgroundDrawable();
|
||||
Slog.w(TAG, "Window background does not exist, using " + themeBGDrawable);
|
||||
}
|
||||
final int animationDuration;
|
||||
final Drawable iconDrawable;
|
||||
|
||||
Reference in New Issue
Block a user