diff --git a/live/src/main/res/layout/rc_conversationlist_item.xml b/live/src/main/res/layout/rc_conversationlist_item.xml index 9b88732e9..5ef66388e 100644 --- a/live/src/main/res/layout/rc_conversationlist_item.xml +++ b/live/src/main/res/layout/rc_conversationlist_item.xml @@ -30,6 +30,7 @@ android:layout_width="wrap_content" android:layout_height="22dp" android:layout_alignParentBottom="true" + android:src="@mipmap/instructors" android:visibility="visible" /> diff --git a/live/src/main/res/mipmap-xhdpi/instructors.png b/live/src/main/res/mipmap-xhdpi/instructors.png new file mode 100644 index 000000000..9b36e5ed8 Binary files /dev/null and b/live/src/main/res/mipmap-xhdpi/instructors.png differ diff --git a/main/src/main/java/com/yunbao/main/views/SearchResultsViewHolder.java b/main/src/main/java/com/yunbao/main/views/SearchResultsViewHolder.java index 3481e5f9b..710f6cecc 100644 --- a/main/src/main/java/com/yunbao/main/views/SearchResultsViewHolder.java +++ b/main/src/main/java/com/yunbao/main/views/SearchResultsViewHolder.java @@ -19,6 +19,7 @@ import com.yunbao.common.glide.ImgLoader; import com.yunbao.common.utils.Bus; import com.yunbao.main.R; import com.yunbao.main.event.JumpUserHomeEvent; +import com.yunbao.main.utils.WordsTypeUtil; public class SearchResultsViewHolder extends RecyclerView.ViewHolder { private ImageView avatar, isLive, sex, focusOn, contribute; @@ -77,7 +78,7 @@ public class SearchResultsViewHolder extends RecyclerView.ViewHolder { } else { ImgLoader.displayAvatar(itemView.getContext(), R.mipmap.icon_sex_male_1, sex); } - nickName.setText(userNicenamehighlight(model.getUserNicename(),searchKey)); + nickName.setText(userNicenamehighlight(model.getUserNicename(), searchKey)); focusOn.setVisibility(TextUtils.equals(model.getIsattention(), "1") ? View.GONE : View.VISIBLE); } @@ -96,9 +97,10 @@ public class SearchResultsViewHolder extends RecyclerView.ViewHolder { } private Spanned userNicenamehighlight(String context, String keyword) { - String keywordHtml = "" + keyword + ""; + String keywordHtml1 = "" + WordsTypeUtil.changeSimplified(keyword) + ""; + String keywordHtml2 = "" + WordsTypeUtil.changeTraditional(keyword) + ""; String contextHtml = "" + context + ""; - contextHtml = contextHtml.replace(keyword, keywordHtml); + contextHtml = contextHtml.replace(WordsTypeUtil.changeSimplified(keyword) ,keywordHtml1).replace(WordsTypeUtil.changeTraditional(keyword),keywordHtml2); return Html.fromHtml(contextHtml); } diff --git a/main/src/main/res/layout/view_search_results_item.xml b/main/src/main/res/layout/view_search_results_item.xml index 6b2a9f674..79cd9bcf1 100644 --- a/main/src/main/res/layout/view_search_results_item.xml +++ b/main/src/main/res/layout/view_search_results_item.xml @@ -80,9 +80,11 @@ + android:background="@mipmap/icon_cange" + android:focusable="true" />