Home | History | Annotate | Download | only in verifier

Lines Matching defs:Activity

40  * {@link Activity}s to handle clicks to the pass and fail buttons of the pass fail buttons layout.
48 * <li>Make sure to call setResult(RESULT_CANCEL) in your Activity initially.</li>
67 * Call from {@link Activity#onCreate} after {@link Activity #setContentView(int)}.
72 * Adds an initial informational dialog that appears when entering the test activity for
76 * Call from {@link Activity#onCreate} after {@link Activity #setContentView(int)}.
94 * Set the result of the test and finish the activity.
104 public static class Activity extends android.app.Activity implements PassFailActivity {
108 public Activity() {
271 protected static <T extends android.app.Activity & PassFailActivity>
272 void setPassFailClickListeners(final T activity) {
276 setTestResultAndFinish(activity, activity.getTestId(), activity.getTestDetails(),
277 activity.getReportLog(), target);
281 View passButton = activity.findViewById(R.id.pass_button);
286 Toast.makeText(activity, R.string.pass_button_text, Toast.LENGTH_SHORT).show();
291 View failButton = activity.findViewById(R.id.fail_button);
296 Toast.makeText(activity, R.string.fail_button_text, Toast.LENGTH_SHORT).show();
302 protected static void setInfo(final android.app.Activity activity, final int titleId,
305 View infoButton = activity.findViewById(R.id.info_button);
310 showInfoDialog(activity, titleId, messageId, viewId);
316 Toast.makeText(activity, R.string.info_button_text, Toast.LENGTH_SHORT).show();
322 if (!hasSeenInfoDialog(activity)) {
323 showInfoDialog(activity, titleId, messageId, viewId);
327 protected static boolean hasSeenInfoDialog(android.app.Activity activity) {
328 ContentResolver resolver = activity.getContentResolver();
331 cursor = resolver.query(TestResultsProvider.getTestNameUri(activity),
341 protected static void showInfoDialog(final android.app.Activity activity, int titleId,
347 activity.showDialog(INFO_DIALOG_ID, args);
350 protected static Dialog createDialog(final android.app.Activity activity, int id, Bundle args) {
353 return createInfoDialog(activity, id, args);
359 protected static Dialog createInfoDialog(final android.app.Activity activity, int id,
365 AlertDialog.Builder builder = new AlertDialog.Builder(activity).setIcon(
368 LayoutInflater inflater = (LayoutInflater) activity
377 markSeenInfoDialog(activity);
382 markSeenInfoDialog(activity);
388 protected static void markSeenInfoDialog(android.app.Activity activity) {
389 ContentResolver resolver = activity.getContentResolver();
391 values.put(TestResultsProvider.COLUMN_TEST_NAME, activity.getClass().getName());
394 TestResultsProvider.getTestNameUri(activity), values, null, null);
396 resolver.insert(TestResultsProvider.getResultContentUri(activity), values);
400 /** Set the test result corresponding to the button clicked and finish the activity. */
401 protected static void setTestResultAndFinish(android.app.Activity activity, String testId,
412 setTestResultAndFinishHelper(activity, testId, testDetails, passed, reportLog);
415 /** Set the test result and finish the activity. */
416 protected static void setTestResultAndFinishHelper(android.app.Activity activity, String testId,
419 TestResult.setPassedResult(activity, testId, testDetails, reportLog);
421 TestResult.setFailedResult(activity, testId, testDetails, reportLog);
424 activity.finish();
427 protected static ImageButton getPassButtonView(android.app.Activity activity) {
428 return (ImageButton) activity.findViewById(R.id.pass_button);