|
|
@@ -11,6 +11,7 @@ import com.donkingliang.labels.LabelsView;
|
|
|
import com.tongyu.luck.happywork.R;
|
|
|
import com.tongyu.luck.happywork.baselibrary.AppConstant;
|
|
|
import com.tongyu.luck.happywork.baselibrary.utils.DateUtils;
|
|
|
+import com.tongyu.luck.happywork.baselibrary.widget.LineLabelsView;
|
|
|
import com.tongyu.luck.happywork.bean.PositionAddressBean;
|
|
|
import com.tongyu.luck.happywork.bean.PositionCompanyBean;
|
|
|
import com.tongyu.luck.happywork.bean.PositionListBean;
|
|
|
@@ -40,7 +41,7 @@ public class PositionListViewHolder extends BaseViewHolder {
|
|
|
@BindView(R.id.tv_area)
|
|
|
TextView tvArea;
|
|
|
@BindView(R.id.labels)
|
|
|
- LabelsView labels;
|
|
|
+ LineLabelsView labels;
|
|
|
@BindView(R.id.tv_back_price)
|
|
|
TextView tvBackPrice;
|
|
|
@BindView(R.id.ll_pay_back)
|
|
|
@@ -74,10 +75,11 @@ public class PositionListViewHolder extends BaseViewHolder {
|
|
|
|
|
|
public PositionListViewHolder(Context mContext) {
|
|
|
super(mContext);
|
|
|
+ labels.setmLineChangeListener(onLineChangeListener);
|
|
|
}
|
|
|
|
|
|
public PositionListViewHolder(Context mContext, long timeDifference) {
|
|
|
- super(mContext);
|
|
|
+ this(mContext);
|
|
|
this.timeDifference = timeDifference;
|
|
|
}
|
|
|
|
|
|
@@ -348,6 +350,20 @@ public class PositionListViewHolder extends BaseViewHolder {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * 当行数变更
|
|
|
+ */
|
|
|
+ LineLabelsView.OnLineChangeListener onLineChangeListener = new LineLabelsView.OnLineChangeListener() {
|
|
|
+ @Override
|
|
|
+ public void showLine(LineLabelsView view, int line, int maxLine) {
|
|
|
+ if (line > 1) {
|
|
|
+ vLabel.setVisibility(View.VISIBLE);
|
|
|
+ } else {
|
|
|
+ vLabel.setVisibility(View.GONE);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ };
|
|
|
+
|
|
|
|
|
|
/**
|
|
|
* 更多标签点击事件
|