布谷精灵系统开发源码

  布谷精灵系统开发找▋小张181/4487/7589微/电▋布谷精灵app开发,布谷精灵软件开发,布谷精灵源码开发,布谷精灵平台开发,布谷精灵模式开发,布谷精灵定制开发,布谷精灵开发多少钱.我司专业开发:社交电商、云电商、新媒体电商...O2O、F2C、B2C、B2B2C、F2B2C、C2B、B2C2N、S2B2C等平台微商城、App、手机网页、PC商城、小程序,微商管理系统、扫码红bao、分销、全返、分红、拼团、区快链商城,农场养殖系统,果园种植游戏,养殖游戏系统,区快链钱包系统,区快链哇矿系统,定-务.系统开发提供中心

  ------温馨提示:专业开发公司,非平台方,玩家勿扰------

  public class SelectDateDialog{

  private static final String TAG="SelectDateDialog";

  private Dialog dialog;

  private TextView dateText;

  private int selectYear,selectMonth;

  private AppCompatActivity mContext;

  private DateAdapter adapter;

  private List<String>selWeekList=new ArrayList<>();

  private List<DateBean>list=new ArrayList<>();

  public SelectDateDialog builder(AppCompatActivity mContext,int year,int month){

  this.mContext=mContext;

  this.selectYear=year;

  this.selectMonth=month;

  //获取Dialog布局

  View view=LayoutInflater.from(mContext).inflate(R.layout.dialog_date,null);

  //定义Dialog布局和参数

  dialog=new Dialog(mContext,R.style.AlertDialogStyle);

  dialog.setCanceledOnTouchOutside(false);//点击外部是否取消

  dialog.setCancelable(false);

  dialog.setContentView(view);

  Window window=dialog.getWindow();

  WindowManager.LayoutParams params=window.getAttributes();

  params.width=(ScreenUtils.getScreenWidth(mContext));

  //params.height=(int)(ScreenUtils.getScreenHeight(mContext)*0.5);

  window.setAttributes(params);

  window.setGravity(Gravity.BOTTOM);

  RecyclerView recycler=view.findViewById(R.id.recycler_select_date);

  dateText=view.findViewById(R.id.date_text);

  dateText.setText(year+"年"+month+"月");

  //下个月

  view.findViewById(R.id.next_month).setOnClickListener(view13->{

  if(selectMonth>11){

  selectYear=selectYear+1;

  selectMonth=1;

  }else{

  selectMonth++;

  }

  showNewData(selectYear,selectMonth);

  });

  //上个月

  view.findViewById(R.id.last_month).setOnClickListener(view14->{

  if(selectMonth<2){

  selectYear=selectYear-1;

  selectMonth=12;

  }else{

  selectMonth--;

  }

  showNewData(selectYear,selectMonth);

  });

  list=DataUtils.getCalendar(year,month);

  adapter=new DateAdapter(mContext,list);

猜你喜欢

转载自www.cnblogs.com/xcxsac/p/11843507.html