修改测试问题,shouye ytuijian
This commit is contained in:
parent
9e5e998f70
commit
6c18b2f806
@ -30,6 +30,7 @@
|
|||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="22dp"
|
android:layout_height="22dp"
|
||||||
android:layout_alignParentBottom="true"
|
android:layout_alignParentBottom="true"
|
||||||
|
android:src="@mipmap/instructors"
|
||||||
android:visibility="visible" />
|
android:visibility="visible" />
|
||||||
</RelativeLayout>
|
</RelativeLayout>
|
||||||
|
|
||||||
|
BIN
live/src/main/res/mipmap-xhdpi/instructors.png
Normal file
BIN
live/src/main/res/mipmap-xhdpi/instructors.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.3 KiB |
@ -19,6 +19,7 @@ import com.yunbao.common.glide.ImgLoader;
|
|||||||
import com.yunbao.common.utils.Bus;
|
import com.yunbao.common.utils.Bus;
|
||||||
import com.yunbao.main.R;
|
import com.yunbao.main.R;
|
||||||
import com.yunbao.main.event.JumpUserHomeEvent;
|
import com.yunbao.main.event.JumpUserHomeEvent;
|
||||||
|
import com.yunbao.main.utils.WordsTypeUtil;
|
||||||
|
|
||||||
public class SearchResultsViewHolder extends RecyclerView.ViewHolder {
|
public class SearchResultsViewHolder extends RecyclerView.ViewHolder {
|
||||||
private ImageView avatar, isLive, sex, focusOn, contribute;
|
private ImageView avatar, isLive, sex, focusOn, contribute;
|
||||||
@ -77,7 +78,7 @@ public class SearchResultsViewHolder extends RecyclerView.ViewHolder {
|
|||||||
} else {
|
} else {
|
||||||
ImgLoader.displayAvatar(itemView.getContext(), R.mipmap.icon_sex_male_1, sex);
|
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);
|
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) {
|
private Spanned userNicenamehighlight(String context, String keyword) {
|
||||||
String keywordHtml = "</font><font color='#FF8D41'size='42px'>" + keyword + "</font><font color='#161616'size='42px'>";
|
String keywordHtml1 = "</font><font color='#FF8D41'size='42px'>" + WordsTypeUtil.changeSimplified(keyword) + "</font><font color='#161616'size='42px'>";
|
||||||
|
String keywordHtml2 = "</font><font color='#FF8D41'size='42px'>" + WordsTypeUtil.changeTraditional(keyword) + "</font><font color='#161616'size='42px'>";
|
||||||
String contextHtml = "<font color='#161616'size='42px'>" + context + "</font>";
|
String contextHtml = "<font color='#161616'size='42px'>" + context + "</font>";
|
||||||
contextHtml = contextHtml.replace(keyword, keywordHtml);
|
contextHtml = contextHtml.replace(WordsTypeUtil.changeSimplified(keyword) ,keywordHtml1).replace(WordsTypeUtil.changeTraditional(keyword),keywordHtml2);
|
||||||
return Html.fromHtml(contextHtml);
|
return Html.fromHtml(contextHtml);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,9 +80,11 @@
|
|||||||
<ImageView
|
<ImageView
|
||||||
android:id="@+id/change_batch"
|
android:id="@+id/change_batch"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
|
android:clickable="true"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:layout_gravity="center_vertical|right"
|
android:layout_gravity="center_vertical|right"
|
||||||
android:background="@mipmap/icon_cange" />
|
android:background="@mipmap/icon_cange"
|
||||||
|
android:focusable="true" />
|
||||||
|
|
||||||
|
|
||||||
<TextView
|
<TextView
|
||||||
|
Loading…
Reference in New Issue
Block a user