/** * * @param calendar */ private void resetTimeToFirstValues(Calendar calendar) { final int currentHour = calendar.get(Calendar.HOUR_OF_DAY); final int currentMinute = calendar.get(Calendar.MINUTE); final int currentSecond = calendar.get(Calendar.SECOND); final int firstHour = this.hour.getFirst(); final int firstMinute = this.minute.getFirst(); final int firstSecond = this.second.getFirst(); if (currentHour != firstHour || currentMinute != firstMinute || currentSecond != firstSecond) { setTime(calendar, firstHour, firstMinute, firstSecond); } }
Integer nextSecond = this.second.getNextMatch(currentSecond); if (nextSecond == null) { return null; nextSecond = this.second.getNextMatch(0); nextSecond = this.second.getNextMatch(0); nextMinute = this.minute.getNextMatch(0);
Second second =new Second(this); second.toast_method();
Class Second{ public void printAll(){ for (int i=0; i<;listOfPeople.size();i++){ Person person = listOfPeople.get(i); double salary =listOfPeople.get(i).getSalary(); newPayroll = new PayrollReportItem(person, salary); newPayroll.toString(); //call method to print values } } Class Third{ //when button pressed to the following Second obj=new Second(); //create an object of second class obj.printAll(); //call method to print }
public void mybutton_click() { Second myfragment = new Second(); Bundle bundle = new Bundle(); bundle.putString("value",et1.getText()); myfragment.setArguments(bundle); activity.addFragment(myfragment, false, "Second"); }
this.second = new Second(schedule.getSecond()); this.minute = new Minute(schedule.getMinute()); this.hour = new Hour(schedule.getHour());
Integer nextSecond = this.second.getNextMatch(currentCal);
switch(v.getId()) { case R.id.button1: Second s = new Second(); //add this fragmentTransaction = fragmentManager.beginTransaction(); fragmentTransaction.replace(android.R.id.content, s); fragmentTransaction.addToBackStack(null); fragmentTransaction.commit(); break; }