version:2.6
fix: update:优化爱心提醒
This commit is contained in:
@@ -29,6 +29,8 @@ import com.uiui.aios.bean.DemandBean;
|
||||
import com.uiui.aios.bean.GoodsInfo;
|
||||
import com.uiui.aios.network.NetInterfaceManager;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import butterknife.BindView;
|
||||
@@ -69,13 +71,23 @@ public class SecondFragment extends BaseFragment {
|
||||
ImageView iv_avatar_a;
|
||||
@BindView(R.id.tv_title_a)
|
||||
TextView tv_title_a;
|
||||
@BindView(R.id.tc_joined_num_a)
|
||||
TextView tc_joined_num_a;
|
||||
@BindView(R.id.tv_time_a)
|
||||
TextView tv_time_a;
|
||||
@BindView(R.id.tv_address_a)
|
||||
TextView tv_address_a;
|
||||
|
||||
@BindView(R.id.iv_avatar_d)
|
||||
ImageView iv_avatar_d;
|
||||
@BindView(R.id.tv_title_d)
|
||||
TextView tv_title_d;
|
||||
@BindView(R.id.tv_price)
|
||||
TextView tv_price;
|
||||
@BindView(R.id.tc_joined_num_d)
|
||||
TextView tc_joined_num_d;
|
||||
@BindView(R.id.tv_time_d)
|
||||
TextView tv_time_d;
|
||||
@BindView(R.id.tv_address_d)
|
||||
TextView tv_address_d;
|
||||
|
||||
@BindView(R.id.iv1)
|
||||
ImageView iv1;
|
||||
@@ -205,9 +217,12 @@ public class SecondFragment extends BaseFragment {
|
||||
}
|
||||
|
||||
private void setDemand(DemandBean demandBean) {
|
||||
Glide.with(iv_avatar_d).load(demandBean.getAvatar()).into(iv_avatar_d);
|
||||
Glide.with(iv_avatar_d).load(demandBean.getAvatar()).error(getResources().getDrawable(R.drawable.default_head)).into(iv_avatar_d);
|
||||
tv_title_d.setText(demandBean.getTitle());
|
||||
tv_price.setText(String.valueOf(demandBean.getPrice()));
|
||||
// tv_price.setText(String.valueOf(demandBean.getPrice()));
|
||||
tc_joined_num_d.setText(demandBean.getLike_count() + "人参加");
|
||||
tv_time_d.setText(getTime(demandBean.getDemand_time()));
|
||||
tv_address_d.setText(demandBean.getAddress());
|
||||
}
|
||||
|
||||
private void getActivityList() {
|
||||
@@ -249,8 +264,17 @@ public class SecondFragment extends BaseFragment {
|
||||
}
|
||||
|
||||
private void setActivity(ActivityBean activity) {
|
||||
Glide.with(iv_avatar_a).load(activity.getAvatar()).into(iv_avatar_a);
|
||||
Glide.with(iv_avatar_a).load(activity.getAvatar()).error(getResources().getDrawable(R.drawable.default_head)).into(iv_avatar_a);
|
||||
tv_title_a.setText(activity.getTitle());
|
||||
tc_joined_num_a.setText(activity.getJoin_num() + "人参加");
|
||||
tv_time_a.setText(getTime(activity.getActivity_time()));
|
||||
tv_address_a.setText(activity.getAddress());
|
||||
}
|
||||
|
||||
private String getTime(long second) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("MM月dd日 HH:mm");
|
||||
Date date = new Date(second * 1000);
|
||||
return sdf.format(date);
|
||||
}
|
||||
|
||||
private void initView() {
|
||||
|
||||
Reference in New Issue
Block a user