use of de.danoeh.antennapod.fragment.AddFeedFragment in project AntennaPod by AntennaPod.
the class MainActivity method loadFragment.
public void loadFragment(String tag, Bundle args) {
Log.d(TAG, "loadFragment(tag: " + tag + ", args: " + args + ")");
Fragment fragment = null;
switch(tag) {
case QueueFragment.TAG:
fragment = new QueueFragment();
break;
case EpisodesFragment.TAG:
fragment = new EpisodesFragment();
break;
case DownloadsFragment.TAG:
fragment = new DownloadsFragment();
break;
case PlaybackHistoryFragment.TAG:
fragment = new PlaybackHistoryFragment();
break;
case AddFeedFragment.TAG:
fragment = new AddFeedFragment();
break;
case SubscriptionFragment.TAG:
SubscriptionFragment subscriptionFragment = new SubscriptionFragment();
fragment = subscriptionFragment;
break;
default:
// default to the queue
tag = QueueFragment.TAG;
fragment = new QueueFragment();
args = null;
break;
}
currentTitle = navAdapter.getLabel(tag);
getSupportActionBar().setTitle(currentTitle);
saveLastNavFragment(tag);
if (args != null) {
fragment.setArguments(args);
}
loadFragment(fragment);
}
use of de.danoeh.antennapod.fragment.AddFeedFragment in project AntennaPod by AntennaPod.
the class SubscriptionsAdapter method onItemClick.
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id) {
if (position == getAddTilePosition()) {
mainActivityRef.get().loadChildFragment(new AddFeedFragment());
} else {
Fragment fragment = ItemlistFragment.newInstance(getItemId(position));
mainActivityRef.get().loadChildFragment(fragment);
}
}
Aggregations