| | |
| | | FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.WRAP_CONTENT, FrameLayout.LayoutParams.WRAP_CONTENT); |
| | | params.setMargins(0, DimenUtils.dip2px(mContext, 8), DimenUtils.dip2px(mContext, 12), 0); |
| | | tv.setLayoutParams(params); |
| | | tv.setTextSize(13); |
| | | tv.setLines(1); |
| | | tv.setTextColor(mContext.getResources().getColor(R.color.search_content_text_color)); |
| | | tv.setTextColor(mContext.getResources().getColor(R.color.text_black_1)); |
| | | tv.setEllipsize(TextUtils.TruncateAt.END); |
| | | tv.setBackground(mContext.getResources().getDrawable(R.drawable.shape_search_history_item_bg)); |
| | | tv.setPadding(DimenUtils.dip2px(mContext, 20), DimenUtils.dip2px(mContext, 5), DimenUtils.dip2px(mContext, 20), DimenUtils.dip2px(mContext, 5)); |
| | |
| | | FrameLayout.LayoutParams params = new FrameLayout.LayoutParams(FrameLayout.LayoutParams.WRAP_CONTENT, FrameLayout.LayoutParams.WRAP_CONTENT); |
| | | params.setMargins(0, DimenUtils.dip2px(context, 8), DimenUtils.dip2px(context, 12), 0); |
| | | tv.setLayoutParams(params); |
| | | tv.setTextSize(13); |
| | | // tv.setTextSize(13); |
| | | tv.setLines(1); |
| | | tv.setTextColor(context.getResources().getColor(R.color.search_content_text_color)); |
| | | tv.setEllipsize(TextUtils.TruncateAt.END); |
| | |
| | | tv.setLines(1); |
| | | tv.setTextColor(mContext.getResources().getColor(R.color.text_black_1)); |
| | | tv.setEllipsize(TextUtils.TruncateAt.END); |
| | | tv.setBackgroundDrawable(mContext.getResources().getDrawable(R.drawable.shape_search1)); |
| | | tv.setBackgroundDrawable(mContext.getResources().getDrawable(R.drawable.shape_search_history_item_bg)); |
| | | tv.setPadding(DimenUtils.dip2px(mContext, 20), DimenUtils.dip2px(mContext, 5), DimenUtils.dip2px(mContext, 20), DimenUtils.dip2px(mContext, 5)); |
| | | tv.setText(list.get(i).getName()); |
| | | tv.setOnClickListener(new View.OnClickListener() { |