com.google.zxing.client.android.history.HistoryActivity Java Examples

The following examples show how to use com.google.zxing.client.android.history.HistoryActivity. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CaptureActivity.java    From ZXing-Standalone-library with Apache License 2.0 6 votes vote down vote up
@Override
public boolean onOptionsItemSelected(MenuItem item) {
  Intent intent = new Intent(Intent.ACTION_VIEW);
  intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
  int i = item.getItemId();
  if (i == R.id.menu_share) {
    intent.setClassName(this, ShareActivity.class.getName());
    startActivity(intent);

  } else if (i == R.id.menu_history) {
    intent.setClassName(this, HistoryActivity.class.getName());
    startActivityForResult(intent, HISTORY_REQUEST_CODE);

  } else if (i == R.id.menu_settings) {
    intent.setClassName(this, PreferencesActivity.class.getName());
    startActivity(intent);

  } else if (i == R.id.menu_help) {
    intent.setClassName(this, HelpActivity.class.getName());
    startActivity(intent);

  } else {
    return super.onOptionsItemSelected(item);
  }
  return true;
}
 
Example #2
Source File: CaptureActivity.java    From analyzer-of-android-for-Apache-Weex with Apache License 2.0 6 votes vote down vote up
@Override
public boolean onOptionsItemSelected(MenuItem item) {
	Intent intent = new Intent(Intent.ACTION_VIEW);
	intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
	int i = item.getItemId();
	if (i == R.id.menu_history) {
		intent.setClassName(this, HistoryActivity.class.getName());
		startActivityForResult(intent, HISTORY_REQUEST_CODE);

		// case R.id.menu_settings:
		// intent.setClassName(this, PreferencesActivity.class.getName());
		// startActivity(intent);
		// break;
		// case R.id.menu_help:
		// intent.setClassName(this, HelpActivity.class.getName());
		// startActivity(intent);
		// break;
	} else {
		return super.onOptionsItemSelected(item);
	}
	return true;
}
 
Example #3
Source File: CaptureActivity.java    From weex with Apache License 2.0 6 votes vote down vote up
@Override
public boolean onOptionsItemSelected(MenuItem item) {
	Intent intent = new Intent(Intent.ACTION_VIEW);
	intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
	int i = item.getItemId();
	if (i == R.id.menu_history) {
		intent.setClassName(this, HistoryActivity.class.getName());
		startActivityForResult(intent, HISTORY_REQUEST_CODE);

		// case R.id.menu_settings:
		// intent.setClassName(this, PreferencesActivity.class.getName());
		// startActivity(intent);
		// break;
		// case R.id.menu_help:
		// intent.setClassName(this, HelpActivity.class.getName());
		// startActivity(intent);
		// break;
	} else {
		return super.onOptionsItemSelected(item);
	}
	return true;
}
 
Example #4
Source File: CaptureActivity.java    From Study_Android_Demo with Apache License 2.0 6 votes vote down vote up
@Override
public boolean onOptionsItemSelected(MenuItem item) {
  Intent intent = new Intent(Intent.ACTION_VIEW);
  intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
  if(item.getItemId() == R.id.menu_share){
    intent.setClassName(this, ShareActivity.class.getName());
    startActivity(intent);
  }else if(item.getItemId() == R.id.menu_history){
    intent.setClassName(this, HistoryActivity.class.getName());
    startActivityForResult(intent, HISTORY_REQUEST_CODE);
  }else if(item.getItemId() == R.id.menu_settings){
    intent.setClassName(this, PreferencesActivity.class.getName());
    startActivity(intent);
  }else if(item.getItemId()==R.id.menu_help){
    intent.setClassName(this, HelpActivity.class.getName());
    startActivity(intent);
  }else{
      return super.onOptionsItemSelected(item);

  }
  return true;
}
 
Example #5
Source File: CaptureActivity.java    From barcodescanner-lib-aar with MIT License 6 votes vote down vote up
@Override
public boolean onOptionsItemSelected(MenuItem item) {
  Intent intent = new Intent(Intent.ACTION_VIEW);
  intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
  int itemId = item.getItemId();
  if (itemId == R.id.menu_history) {
      intent.setClassName(this, HistoryActivity.class.getName());
      startActivityForResult(intent, HISTORY_REQUEST_CODE);
  } else if (itemId == R.id.menu_settings) {
      intent.setClassName(this, PreferencesActivity.class.getName());
      startActivity(intent);
  } else if (itemId == R.id.menu_help) {
      intent.setClassName(this, HelpActivity.class.getName());
      startActivity(intent);
  } else {
      return super.onOptionsItemSelected(item);
  }
  return true;
}
 
Example #6
Source File: CaptureActivity.java    From reacteu-app with MIT License 6 votes vote down vote up
@Override
public boolean onOptionsItemSelected(MenuItem item) {
  Intent intent = new Intent(Intent.ACTION_VIEW);
  intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
  int itemId = item.getItemId();
  if (itemId == fakeR.getId("id", "menu_share")) {
      intent.setClassName(this, ShareActivity.class.getName());
      startActivity(intent);
  } else if (itemId == fakeR.getId("id", "menu_history")) {
      intent.setClassName(this, HistoryActivity.class.getName());
      startActivityForResult(intent, HISTORY_REQUEST_CODE);
  } else if (itemId == fakeR.getId("id", "menu_settings")) {
      intent.setClassName(this, PreferencesActivity.class.getName());
      startActivity(intent);
  } else if (itemId == fakeR.getId("id", "menu_help")) {
      intent.setClassName(this, HelpActivity.class.getName());
      startActivity(intent);
  } else {
      return super.onOptionsItemSelected(item);
  }
  return true;
}