Java源码示例:com.socks.jiandan.ui.CommentListActivity
示例1
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.action_comment:
Intent intent = new Intent(getActivity(), CommentListActivity.class);
intent.putExtra(DATA_THREAD_ID, freshNews.getId());
intent.putExtra(DATA_IS_FROM_FRESH_NEWS, true);
startActivity(intent);
return true;
case R.id.action_share:
ShareUtil.shareText(getActivity(), freshNews.getTitle() + " " + freshNews.getUrl());
return true;
}
return super.onOptionsItemSelected(item);
}
示例2
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.action_comment:
Intent intent = new Intent(getActivity(), CommentListActivity.class);
intent.putExtra(DATA_THREAD_ID, freshNews.getId());
intent.putExtra(DATA_IS_FROM_FRESH_NEWS, true);
startActivity(intent);
return true;
case R.id.action_share:
ShareUtil.shareText(getActivity(), freshNews.getTitle() + " " + freshNews.getUrl());
return true;
}
return super.onOptionsItemSelected(item);
}
示例3
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.action_comment:
Intent intent = new Intent(getActivity(), CommentListActivity.class);
intent.putExtra(DATA_THREAD_ID, freshNews.getId());
intent.putExtra(DATA_IS_FROM_FRESH_NEWS, true);
startActivity(intent);
return true;
case R.id.action_share:
ShareUtil.shareText(getActivity(), freshNews.getTitle() + " " + freshNews.getUrl());
return true;
}
return super.onOptionsItemSelected(item);
}