private Intent getShareIntent() { Intent intent = new Intent(android.content.Intent.ACTION_SEND); intent.setType("text/plain"); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET); intent.putExtra( Intent.EXTRA_SUBJECT, Stopwatches.getShareTitle(getActivity().getApplicationContext())); intent.putExtra( Intent.EXTRA_TEXT, Stopwatches.buildShareResults( getActivity().getApplicationContext(), mTimeText.getTimeString(), getLapShareTimes(mLapsAdapter.getLapTimes()))); return intent; }
protected void setTimeText(View lapInfo, Lap lap) { TextView lapTime = (TextView) lapInfo.findViewById(R.id.lap_time); TextView totalTime = (TextView) lapInfo.findViewById(R.id.lap_total); lapTime.setText(Stopwatches.formatTimeText(lap.mLapTime, mFormats[mLapIndex])); totalTime.setText(Stopwatches.formatTimeText(lap.mTotalTime, mFormats[mTotalIndex])); }