Super contacts app open source

  Super network of system developers find ▋ Zhang 181/4487/7589 micro / electric ▋ Super contacts app developers, super network of software developers, super contacts source development, super contacts platform, super network of model development, super network of custom-developed, super network of development how much our professional development: social electricity providers, cloud electricity supplier, electricity supplier new media ... O2O, F2C, B2C, B2B2C, F2B2C, C2B, B2C2N, S2B2C platforms such as micro-mall, App, mobile web, PC Mall , applets, micro-business management system, scan code red bao, distribution, full back, dividends, fight groups, area fast chain store, farm breeding system, orchard planting game, breeding game system, district quick chain wallet system, area fast chain wow mining system, set - provides a central service system development

  ------ Tips: professional development company, the non-party platform, players not faze ------

  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;

  // Get Dialog layout

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

  // define the layout and parameters Dialog

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

  dialog.setCanceledOnTouchOutside (false); // Click on whether to cancel the external

  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+"月");

  //next month

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

  if(selectMonth>11){

  selectYear=selectYear+1;

  selectMonth=1;

  }else{

  selectMonth++;

  }

  showNewData(selectYear,selectMonth);

  });

  //last month

  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);

Guess you like

Origin www.cnblogs.com/xcxsac/p/11843278.html