Search in sources :

Example 1 with GagFragment

use of com.mixiaoxiao.ninegag.fragment.GagFragment in project 9GAG by Mixiaoxiao.

the class MainActivity method onOptionsItemSelected.

@Override
public boolean onOptionsItemSelected(MenuItem item) {
    // TODO Auto-generated method stub
    if (item.getItemId() == R.id.action_refresh) {
        GagFragment gagFragment = ((GagAdapter2) mViewPager.getAdapter()).getItem(mViewPager.getCurrentItem());
        gagFragment.refresh();
        return true;
    } else if (item.getItemId() == R.id.action_about) {
        startActivity(new Intent(this, AboutActivity.class));
        return true;
    }
    return super.onOptionsItemSelected(item);
}
Also used : GagFragment(com.mixiaoxiao.ninegag.fragment.GagFragment) Intent(android.content.Intent)

Aggregations

Intent (android.content.Intent)1 GagFragment (com.mixiaoxiao.ninegag.fragment.GagFragment)1