TextWatcher textWatcher = new TextWatcher() {
@Override
public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}
@Override
public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) {
}
@Override
public void afterTextChanged(Editable editable) {
}
};
StringFormatUtil spanStr3 = new //分别是上下文,原串,key,高亮颜色。 StringFormatUtil(mContext, data.name, mkey, R.color.blue).fillColor(); customerHolder.tvName.setText(spanStr3.getResult());
public CustomerCampanySearchAdapter(List<Customer> list, Context context, String key) {
super(list);
mContext = context;
mkey = key;
this.list = list;
}
public void showCustomer(List<Customer> list, String key) {
if (list == null || list.size() == 0)
return;
customerList.clear();
customerList.addAll(list);
adapter = new CustomerCampanySearchAdapter(customerList, this, key);
superRecyclerView.setAdapter(adapter);
superRecyclerView.showData();
adapter.setOnItemClickListener(new BaseRecyclerAdapter.OnItemClickListener() {
@Override
public void onItemClick(View view, int position, long id) {
//
}
});
}
@Override
public void onBindViewHolder(BaseRecyclerViewHolder holder, int position, final Customer data) {
CustomerHolder customerHolder = (CustomerHolder) holder;
customerHolder.tvName.setText(data.name);
StringFormatUtil spanStr3 = new StringFormatUtil(mContext, data.name,
mkey, R.color.blue).fillColor();
if (spanStr3 != null)
customerHolder.tvName.setText(spanStr3.getResult());
else customerHolder.tvName.setText(data.name);
}
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有