/**
* Handle options menu
*/
@Override
public boolean onOptionsItemSelected(MenuItem item) {
int id = item.getItemId();
if (id == android.R.id.home) {
// Do the same thing as the back button.
onBackPressed();
return true;
} else if (id == R.id.action_settings) {
Intent intent = new Intent(this, SettingsActivity.class);
intent.putExtra(PreferenceActivity.EXTRA_SHOW_FRAGMENT, SettingsActivity.SlideshowPreferenceFragment.class.getName());
intent.putExtra(PreferenceActivity.EXTRA_NO_HEADERS, true);
startActivity(intent);
return true;
} else if (id == R.id.action_credits) {
startActivity(new Intent(this, CreditsActivity.class));
return true;
}
return super.onOptionsItemSelected(item);
}
BaseActivity.java 文件源码
java
阅读 36
收藏 0
点赞 0
评论 0
项目:android-slideshow
作者:
评论列表
文章目录