// 将文本内容放到系统剪贴板里。
ClipboardManager cm = (ClipboardManager)getActivityContext().getSystemService(Context.CLIPBOARD_SERVICE);
cm.setText(joinGroupDetailBean.getEntryNumber());ToastUtil.showCenterToast("复制成功");
// 打电话
Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + joinGroupDetailBean.getSponsorPhone()));
startActivity(intent);
//时间倒数器
final Handler handler=new Handler();
final Timer timer =new Timer();
timer.schedule(new TimerTask() {
@Override
public void run() {
handler.postDelayed(new Runnable() {
@Override
public void run() {
long time=(data.getEntryEndTime()-System.currentTimeMillis())/1000;
if (time<=0) {
timer.cancel();
}
long day=time/86400;
long hour=(time-day*86400)/3600;
long minute=(time-day*86400-hour*3600)/60;
long second=time-day*86400-hour*3600-minute*60;
remainDayTv.setText(""+day+"");
remainHourTv.setText(""+hour+"");
remainMinTv.setText(""+minute+"");
remainSecondTv.setText(""+second+"");
}
},0);
}},0,1000);
网友评论