BaseActivity.java 文件源码

java
阅读 36 收藏 0 点赞 0 评论 0

项目:android-slideshow 作者:
/**
 * 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);
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号