List of usage examples for android.transition Slide Slide
public Slide(int slideEdge)
From source file:org.gateshipone.malp.application.activities.MainActivity.java
@Override public void showAlbumsForPath(String path) { if (mNowPlayingDragStatus == DRAG_STATUS.DRAGGED_UP) { NowPlayingView nowPlayingView = (NowPlayingView) findViewById(R.id.now_playing_layout); if (nowPlayingView != null) { View coordinatorLayout = findViewById(R.id.main_coordinator_layout); coordinatorLayout.setVisibility(View.VISIBLE); nowPlayingView.minimize();//from w w w . j a v a 2s . com } } // Create fragment and give it an argument for the selected article AlbumsFragment newFragment = new AlbumsFragment(); Bundle args = new Bundle(); args.putString(AlbumsFragment.BUNDLE_STRING_EXTRA_PATH, path); 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, AlbumsFragment.TAG); transaction.addToBackStack("DirectoryAlbumsFragment"); NavigationView navigationView = (NavigationView) findViewById(R.id.nav_view); navigationView.setCheckedItem(R.id.nav_library); // Commit the transaction transaction.commit(); }
From source file:org.gateshipone.malp.application.activities.MainActivity.java
@Override public void openArtworkSettings() { // Create fragment and give it an argument for the selected directory ArtworkSettingsFragment newFragment = new ArtworkSettingsFragment(); FragmentManager fragmentManager = getSupportFragmentManager(); android.support.v4.app.FragmentTransaction transaction = fragmentManager.beginTransaction(); newFragment.setEnterTransition(new Slide(GravityCompat.getAbsoluteGravity(GravityCompat.START, getResources().getConfiguration().getLayoutDirection()))); newFragment.setExitTransition(new Slide(GravityCompat.getAbsoluteGravity(GravityCompat.END, getResources().getConfiguration().getLayoutDirection()))); transaction.addToBackStack("ArtworkSettingsFragment"); transaction.replace(R.id.fragment_container, newFragment); // Commit the transaction transaction.commit();/*from w ww . j a v a 2 s . co m*/ }
From source file:org.gateshipone.odyssey.activities.OdysseyMainActivity.java
@Override public void openArtworkSettings() { // Create fragment and give it an argument for the selected directory ArtworkSettingsFragment newFragment = new ArtworkSettingsFragment(); FragmentManager fragmentManager = getSupportFragmentManager(); android.support.v4.app.FragmentTransaction transaction = fragmentManager.beginTransaction(); // set enter / exit animation newFragment.setEnterTransition(new Slide(GravityCompat.getAbsoluteGravity(GravityCompat.START, getResources().getConfiguration().getLayoutDirection()))); newFragment.setExitTransition(new Slide(GravityCompat.getAbsoluteGravity(GravityCompat.END, getResources().getConfiguration().getLayoutDirection()))); transaction.addToBackStack("ArtworkSettingsFragment"); transaction.replace(R.id.fragment_container, newFragment); // Commit the transaction transaction.commit();/*from w ww . j av a 2s .c om*/ }