From 37878683fff58ea6f902377abc0b44b9246e6292 Mon Sep 17 00:00:00 2001 From: Selim Cinek Date: Mon, 2 May 2016 13:40:58 -0700 Subject: [PATCH] Fixed a bug where the image and the text were overlapping If a notification was updated with an image, the layout could stay the old one. Change-Id: Ic012193e79acf14551801e5e2b704ab9519b9c50 Fixes: 28315999 --- .../internal/widget/ImageFloatingTextView.java | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/core/java/com/android/internal/widget/ImageFloatingTextView.java b/core/java/com/android/internal/widget/ImageFloatingTextView.java index e2d8ffc4d9b1f..926ebd158b50f 100644 --- a/core/java/com/android/internal/widget/ImageFloatingTextView.java +++ b/core/java/com/android/internal/widget/ImageFloatingTextView.java @@ -16,22 +16,19 @@ package com.android.internal.widget; -import com.android.internal.R; - import android.annotation.Nullable; import android.content.Context; -import android.content.res.Configuration; -import android.content.res.TypedArray; import android.text.BoringLayout; import android.text.Layout; import android.text.StaticLayout; import android.text.TextUtils; import android.util.AttributeSet; -import android.util.TypedValue; import android.view.RemotableViewMethod; import android.widget.RemoteViews; import android.widget.TextView; +import com.android.internal.R; + /** * A TextView that can float around an image on the end. * @@ -96,9 +93,7 @@ public class ImageFloatingTextView extends TextView { @RemotableViewMethod public void setHasImage(boolean hasImage) { - mIndentLines = hasImage ? 2 : 0; - // The new layout will be automatically created when the text is - // set again by the notification. + setNumIndentLines(hasImage ? 2 : 0); } /**