Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 954cc230 authored by Selim Cinek's avatar Selim Cinek
Browse files

Fixed a bug where the text directionality was inconsistent

The title would not be fully right aligned because it wasn't
layouted with match_parent because there could be a second visible
text when there is a progressbar.

Change-Id: I73d97d9a8addaec0e3b849349f220c764fa45db0
Fixes: 27893267
parent 07304f52
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -58,6 +58,7 @@ import android.util.SparseArray;
import android.view.Gravity;
import android.view.NotificationHeaderView;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ProgressBar;
import android.widget.RemoteViews;

@@ -3194,11 +3195,14 @@ public class Notification implements Parcelable

            bindNotificationHeader(contentView);
            bindLargeIcon(contentView);
            boolean showProgress = handleProgressBar(hasProgress, contentView, ex);
            if (title != null) {
                contentView.setViewVisibility(R.id.title, View.VISIBLE);
                contentView.setTextViewText(R.id.title, title);
                contentView.setViewLayoutWidth(R.id.title, showProgress
                        ? ViewGroup.LayoutParams.WRAP_CONTENT
                        : ViewGroup.LayoutParams.MATCH_PARENT);
            }
            boolean showProgress = handleProgressBar(hasProgress, contentView, ex);
            if (text != null) {
                int textId = showProgress ? com.android.internal.R.id.text_line_1
                        : com.android.internal.R.id.text;