Search in sources :

Example 1 with ArtworkSettingsFragment

use of org.gateshipone.malp.application.fragments.ArtworkSettingsFragment in project malp by gateship-one.

the class MainActivity method openArtworkSettings.

@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();
}
Also used : FragmentManager(android.support.v4.app.FragmentManager) Slide(android.transition.Slide) FragmentTransaction(android.support.v4.app.FragmentTransaction) ArtworkSettingsFragment(org.gateshipone.malp.application.fragments.ArtworkSettingsFragment)

Aggregations

FragmentManager (android.support.v4.app.FragmentManager)1 FragmentTransaction (android.support.v4.app.FragmentTransaction)1 Slide (android.transition.Slide)1 ArtworkSettingsFragment (org.gateshipone.malp.application.fragments.ArtworkSettingsFragment)1