add menu to select kiosk of current service

This commit is contained in:
Christian Schabesberger 2017-10-05 14:57:19 +02:00
parent 46fa9a9366
commit 6d8a361c9a
4 changed files with 70 additions and 7 deletions

View file

@ -23,6 +23,7 @@ import org.schabi.newpipe.fragments.MainFragment;
import org.schabi.newpipe.fragments.detail.VideoDetailFragment;
import org.schabi.newpipe.fragments.list.channel.ChannelFragment;
import org.schabi.newpipe.fragments.list.feed.FeedFragment;
import org.schabi.newpipe.fragments.list.kiosk.KioskFragment;
import org.schabi.newpipe.fragments.list.playlist.PlaylistFragment;
import org.schabi.newpipe.fragments.list.search.SearchFragment;
import org.schabi.newpipe.history.HistoryActivity;
@ -163,6 +164,15 @@ public class NavigationHelper {
.commit();
}
public static void openKioskFragment(FragmentManager fragmentManager, int serviceId, String kioskId)
throws ExtractionException {
fragmentManager.beginTransaction()
.setCustomAnimations(R.animator.custom_fade_in, R.animator.custom_fade_out, R.animator.custom_fade_in, R.animator.custom_fade_out)
.replace(R.id.fragment_holder, KioskFragment.getInstance(serviceId, kioskId))
.addToBackStack(null)
.commit();
}
/*//////////////////////////////////////////////////////////////////////////
// Through Intents
//////////////////////////////////////////////////////////////////////////*/