本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}