|
@@ -25,6 +25,7 @@ import com.sheishuo.app.common.util.img.ImgUtil;
|
|
|
import com.sheishuo.app.common.views.GridViewAdapter;
|
|
|
import com.sheishuo.app.common.views.ImgGridView;
|
|
|
import com.sheishuo.app.common.views.PartlyHighLightTextView;
|
|
|
+import com.sheishuo.app.core_module.trade.model.TradeModel;
|
|
|
import com.sheishuo.app.core_module.trade.view.ui.activity.TradeChangePriorityActivity;
|
|
|
import com.sheishuo.app.login.beans.LoginBean;
|
|
|
import com.sheishuo.app.main.fragment.TradeListFragment;
|
|
@@ -79,12 +80,20 @@ public class TradeItemAdapter extends RecyclerView.Adapter<TradeItemAdapter.Trad
|
|
|
//设置交易帖内容和地区标注
|
|
|
holder.content.setText(bean.getMsg());
|
|
|
String highLightStr = "";
|
|
|
- if (!bean.getCity().isEmpty()){
|
|
|
- highLightStr = "[" + bean.getCity() + "]";
|
|
|
- }
|
|
|
+
|
|
|
if (!bean.getDistrict().isEmpty()){
|
|
|
highLightStr = highLightStr + "[" + bean.getDistrict() + "]";
|
|
|
+ }else {
|
|
|
+ highLightStr = highLightStr + "[全国]";
|
|
|
}
|
|
|
+
|
|
|
+ if (Integer.valueOf(bean.getType()) == TradeModel.TYPE_SELL){
|
|
|
+ highLightStr = highLightStr + "[出售]";
|
|
|
+ }else if(Integer.valueOf(bean.getType()) == TradeModel.TYPE_BUY){
|
|
|
+ highLightStr = highLightStr + "[求购]";
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
if (!highLightStr.isEmpty()){
|
|
|
holder.content.addHightlightStr(highLightStr,R.color.green_4DC0A4);
|
|
|
}
|
|
@@ -96,16 +105,16 @@ public class TradeItemAdapter extends RecyclerView.Adapter<TradeItemAdapter.Trad
|
|
|
//判断有无置顶加权
|
|
|
switch (bean.getPriority_type()){
|
|
|
case PRIORITY_DISTRICT:
|
|
|
- holder.priority.setText("地区 " + bean.getPriority());
|
|
|
+ holder.priority.setText("地区x" + bean.getPriority());
|
|
|
break;
|
|
|
case PRIORITY_CITY:
|
|
|
- holder.priority.setText("城市 " + bean.getPriority());
|
|
|
+ holder.priority.setText("城市x" + bean.getPriority());
|
|
|
break;
|
|
|
case PRIORITY_PROVINCE:
|
|
|
- holder.priority.setText("省份 " + bean.getPriority());
|
|
|
+ holder.priority.setText("省份x" + bean.getPriority());
|
|
|
break;
|
|
|
case PRIORITY_COUNTRY:
|
|
|
- holder.priority.setText("国家 " + bean.getPriority());
|
|
|
+ holder.priority.setText("国家x" + bean.getPriority());
|
|
|
break;
|
|
|
}
|
|
|
|