当前位置: 首页>>代码示例>>Java>>正文


Java ShareActivity类代码示例

本文整理汇总了Java中com.google.zxing.client.android.share.ShareActivity的典型用法代码示例。如果您正苦于以下问题:Java ShareActivity类的具体用法?Java ShareActivity怎么用?Java ShareActivity使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


ShareActivity类属于com.google.zxing.client.android.share包,在下文中一共展示了ShareActivity类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: onOptionsItemSelected

import com.google.zxing.client.android.share.ShareActivity; //导入依赖的package包/类
@Override
public boolean onOptionsItemSelected(MenuItem item) {
	Intent intent = new Intent(Intent.ACTION_VIEW);
	intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
	switch (item.getItemId()) {
	case R.id.menu_share:
		intent.setClassName(this, ShareActivity.class.getName());
		startActivity(intent);
		break;
	case R.id.menu_history:
		intent.setClassName(this, HistoryActivity.class.getName());
		startActivityForResult(intent, HISTORY_REQUEST_CODE);
		break;
	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;
	default:
		return super.onOptionsItemSelected(item);
	}
	return true;
}
 
开发者ID:xiong-it,项目名称:PortraitZXing,代码行数:27,代码来源:CaptureActivity.java

示例2: onOptionsItemSelected

import com.google.zxing.client.android.share.ShareActivity; //导入依赖的package包/类
@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;
}
 
开发者ID:atomsheep,项目名称:sres-app,代码行数:23,代码来源:CaptureActivity.java

示例3: onOptionsItemSelected

import com.google.zxing.client.android.share.ShareActivity; //导入依赖的package包/类
@Override
public boolean onOptionsItemSelected(MenuItem item) {
    Intent intent = new Intent(Intent.ACTION_VIEW);
    intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
    switch (item.getItemId()) {
        case R.id.menu_share:
            intent.setClassName(this, ShareActivity.class.getName());
            startActivity(intent);
            break;
        case R.id.menu_history:
            intent.setClassName(this, HistoryActivity.class.getName());
            startActivityForResult(intent, HISTORY_REQUEST_CODE);
            break;
        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;
        default:
            return super.onOptionsItemSelected(item);
    }
    return true;
}
 
开发者ID:yakovenkodenis,项目名称:Discounty,代码行数:27,代码来源:CaptureActivity.java

示例4: onOptionsItemSelected

import com.google.zxing.client.android.share.ShareActivity; //导入依赖的package包/类
@Override
public boolean onOptionsItemSelected(MenuItem item) {
  Intent intent = new Intent(Intent.ACTION_VIEW);
  intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET);
  switch (item.getItemId()) {
    case R.id.menu_share:
      intent.setClassName(this, ShareActivity.class.getName());
      startActivity(intent);
      break;
    case R.id.menu_history:
      intent.setClassName(this, HistoryActivity.class.getName());
      startActivityForResult(intent, HISTORY_REQUEST_CODE);
      break;
    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;
    default:
      return super.onOptionsItemSelected(item);
  }
  return true;
}
 
开发者ID:xiaowei4895,项目名称:zxing-android-portrait,代码行数:27,代码来源:CaptureActivity.java

示例5: onOptionsItemSelected

import com.google.zxing.client.android.share.ShareActivity; //导入依赖的package包/类
@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_share) {
        intent.setClassName(this, ShareActivity.class.getName());
        startActivity(intent);
    } else 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;
}
 
开发者ID:thomas-bornschlegel,项目名称:AndroidMultiChannelMiddleware,代码行数:23,代码来源:CaptureActivity.java

示例6: onOptionsItemSelected

import com.google.zxing.client.android.share.ShareActivity; //导入依赖的package包/类
@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_share)
{
	intent.setClassName(this, ShareActivity.class.getName());
	startActivity(intent);
} else 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;
 }
 
开发者ID:FAIMS,项目名称:faims-android,代码行数:28,代码来源:CaptureActivity.java


注:本文中的com.google.zxing.client.android.share.ShareActivity类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。