CopyPastor

Detecting plagiarism made easy.

Score: -1; Reported for: Open both answers

Possible Plagiarism

Reposted on 2015-11-19

Original Post

Original - Posted on 2013-02-20



            
Present in both answers; Present only in the new answer; Present only in the old answer;

public void onTimeSet(TimePicker view, int hourOfDay, int minute) { String am_pm = ""; Calendar datetime = Calendar.getInstance(); datetime.set(Calendar.HOUR_OF_DAY, hourOfDay); datetime.set(Calendar.MINUTE, minute); if (datetime.get(Calendar.AM_PM) == Calendar.AM) am_pm = "AM"; else if (datetime.get(Calendar.AM_PM) == Calendar.PM) am_pm = "PM"; String strHrsToShow = (datetime.get(Calendar.HOUR) == 0) ?"12":datetime.get(Calendar.HOUR)+""; ((Button)getActivity().findViewById(R.id.btnEventStartTime)).setText( strHrsToShow+":"+datetime.get(Calendar.MINUTE)+" "+am_pm ); }

This will also help .
Try This:
public void onTimeSet(TimePicker view, int hourOfDay, int minute) { String am_pm = ""; Calendar datetime = Calendar.getInstance(); datetime.set(Calendar.HOUR_OF_DAY, hourOfDay); datetime.set(Calendar.MINUTE, minute); if (datetime.get(Calendar.AM_PM) == Calendar.AM) am_pm = "AM"; else if (datetime.get(Calendar.AM_PM) == Calendar.PM) am_pm = "PM"; String strHrsToShow = (datetime.get(Calendar.HOUR) == 0) ?"12":datetime.get(Calendar.HOUR)+""; ((Button)getActivity().findViewById(R.id.btnEventStartTime)).setText( strHrsToShow+":"+datetime.get(Calendar.MINUTE)+" "+am_pm ); }

        
Present in both answers; Present only in the new answer; Present only in the old answer;