修改主页样式
This commit is contained in:
@@ -19,6 +19,7 @@ import android.widget.TextView;
|
||||
|
||||
import com.blankj.utilcode.util.NetworkUtils;
|
||||
import com.bumptech.glide.Glide;
|
||||
import com.shehuan.niv.NiceImageView;
|
||||
import com.trello.rxlifecycle4.RxLifecycle;
|
||||
import com.trello.rxlifecycle4.android.FragmentEvent;
|
||||
import com.uiui.aios.R;
|
||||
@@ -113,6 +114,12 @@ public class SecondFragment extends BaseFragment implements NetworkUtils.OnNetwo
|
||||
@BindView(R.id.cl4)
|
||||
ConstraintLayout cl4;
|
||||
|
||||
@BindView(R.id.nv_pic)
|
||||
NiceImageView nv_pic;
|
||||
@BindView(R.id.tv_like)
|
||||
TextView tv_like;
|
||||
@BindView(R.id.tv_comment)
|
||||
TextView tv_comment;
|
||||
|
||||
private View rootView;
|
||||
private Context mContext;
|
||||
@@ -265,12 +272,15 @@ public class SecondFragment extends BaseFragment implements NetworkUtils.OnNetwo
|
||||
tv_title_a.setText(activity.getName());
|
||||
tc_joined_num_a.setText(activity.getJoin_num() + "人参加");
|
||||
tv_time_a.setText(getTime(activity.getAdd_time()));
|
||||
tv_address_a.setText(activity.getAddress());
|
||||
tv_address_a.setText(activity.getLocation());
|
||||
Glide.with(nv_pic).load(activity.getFile()).centerCrop().into(nv_pic);
|
||||
tv_like.setText(activity.getLike_count() + "");
|
||||
tv_comment.setText(activity.getComment_count() + "");
|
||||
}
|
||||
|
||||
private String getTime(long second) {
|
||||
long ms = second * 1000L;
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("MM月dd日 HH:mm");
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("MM月dd日");
|
||||
Date date = new Date(ms);
|
||||
String time = sdf.format(date);
|
||||
Log.e(TAG, "getTime: " + time);
|
||||
|
||||
Reference in New Issue
Block a user