use of org.gateshipone.malp.application.fragments.serverfragments.PlaylistTracksFragment in project malp by gateship-one.
the class MainActivity method openPlaylist.
@Override
public void openPlaylist(String name) {
// Create fragment and give it an argument for the selected article
PlaylistTracksFragment newFragment = new PlaylistTracksFragment();
Bundle args = new Bundle();
args.putString(PlaylistTracksFragment.EXTRA_PLAYLIST_NAME, name);
newFragment.setArguments(args);
android.support.v4.app.FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
newFragment.setEnterTransition(new Slide(GravityCompat.getAbsoluteGravity(GravityCompat.START, getResources().getConfiguration().getLayoutDirection())));
newFragment.setExitTransition(new Slide(GravityCompat.getAbsoluteGravity(GravityCompat.END, getResources().getConfiguration().getLayoutDirection())));
// Replace whatever is in the fragment_container view with this
// fragment,
// and add the transaction to the back stack so the user can navigate
// back
transaction.replace(R.id.fragment_container, newFragment);
transaction.addToBackStack("PlaylistTracksFragment");
// Commit the transaction
transaction.commit();
}
Aggregations