diff options
author | Maxime Biais <maxime.biais@gmail.com> | 2015-02-27 17:45:45 +0100 |
---|---|---|
committer | Maxime Biais <maxime.biais@gmail.com> | 2015-02-27 17:45:45 +0100 |
commit | 0660f184fb71c2ad0ab5f440a4d419dbe4a3cccd (patch) | |
tree | db775e52d6de36311b59dcb2af6c90ca7e6be28a /WordPress/src/main/java/org/wordpress | |
parent | b60e0cedd144a9557ff373c49e3190333044c35a (diff) | |
parent | 16b05cf342f99e119f7bcbf0191f26dd01113767 (diff) | |
download | gradle-perf-android-medium-0660f184fb71c2ad0ab5f440a4d419dbe4a3cccd.tar.gz |
Merge pull request #2376 from wordpress-mobile/issue/notification-reply-header
Issue/notification reply header
Diffstat (limited to 'WordPress/src/main/java/org/wordpress')
2 files changed, 9 insertions, 2 deletions
diff --git a/WordPress/src/main/java/org/wordpress/android/ui/notifications/blocks/CommentUserNoteBlock.java b/WordPress/src/main/java/org/wordpress/android/ui/notifications/blocks/CommentUserNoteBlock.java index a18cc7455..ce27fd41d 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/notifications/blocks/CommentUserNoteBlock.java +++ b/WordPress/src/main/java/org/wordpress/android/ui/notifications/blocks/CommentUserNoteBlock.java @@ -1,6 +1,7 @@ package org.wordpress.android.ui.notifications.blocks; import android.content.Context; +import android.text.Html; import android.text.TextUtils; import android.view.View; import android.widget.TextView; @@ -54,7 +55,7 @@ public class CommentUserNoteBlock extends UserNoteBlock { public View configureView(View view) { final CommentUserNoteBlockHolder noteBlockHolder = (CommentUserNoteBlockHolder)view.getTag(); - noteBlockHolder.nameTextView.setText(getNoteText().toString()); + noteBlockHolder.nameTextView.setText(Html.fromHtml("<strong>" + getNoteText().toString() + "</strong>")); noteBlockHolder.agoTextView.setText(DateTimeUtils.timestampToTimeSpan(getTimestamp())); if (!TextUtils.isEmpty(getMetaHomeTitle()) || !TextUtils.isEmpty(getMetaSiteUrl())) { noteBlockHolder.bulletTextView.setVisibility(View.VISIBLE); diff --git a/WordPress/src/main/java/org/wordpress/android/ui/notifications/blocks/HeaderUserNoteBlock.java b/WordPress/src/main/java/org/wordpress/android/ui/notifications/blocks/HeaderUserNoteBlock.java index 135afb015..cfefc27a5 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/notifications/blocks/HeaderUserNoteBlock.java +++ b/WordPress/src/main/java/org/wordpress/android/ui/notifications/blocks/HeaderUserNoteBlock.java @@ -1,6 +1,7 @@ package org.wordpress.android.ui.notifications.blocks; import android.content.Context; +import android.text.Spannable; import android.text.TextUtils; import android.view.MotionEvent; import android.view.View; @@ -10,6 +11,7 @@ import android.widget.TextView; import org.json.JSONArray; import org.json.JSONObject; import org.wordpress.android.R; +import org.wordpress.android.ui.notifications.utils.NotificationsUtils; import org.wordpress.android.util.GravatarUtils; import org.wordpress.android.util.JSONUtil; import org.wordpress.android.widgets.WPNetworkImageView; @@ -49,7 +51,11 @@ public class HeaderUserNoteBlock extends NoteBlock { public View configureView(View view) { final NoteHeaderBlockHolder noteBlockHolder = (NoteHeaderBlockHolder)view.getTag(); - noteBlockHolder.nameTextView.setText(getUserName()); + Spannable spannable = NotificationsUtils.getSpannableContentFromIndices( + mHeaderArray.optJSONObject(0), + null, + null); + noteBlockHolder.nameTextView.setText(spannable); noteBlockHolder.avatarImageView.setImageUrl(getAvatarUrl(), WPNetworkImageView.ImageType.AVATAR); if (!TextUtils.isEmpty(getUserUrl())) { noteBlockHolder.avatarImageView.setOnTouchListener(mOnGravatarTouchListener); |