Search in sources :

Example 56 with DialogFragment

use of android.support.v4.app.DialogFragment in project MovieGuide by esoxjem.

the class MoviesListingFragment method displaySortingOptions.

private void displaySortingOptions() {
    DialogFragment sortingDialogFragment = SortingDialogFragment.newInstance(moviesPresenter);
    sortingDialogFragment.show(getFragmentManager(), "Select Quantity");
}
Also used : SortingDialogFragment(com.esoxjem.movieguide.listing.sorting.SortingDialogFragment) DialogFragment(android.support.v4.app.DialogFragment)

Example 57 with DialogFragment

use of android.support.v4.app.DialogFragment in project facebook-android-sdk by facebook.

the class FacebookActivity method getFragment.

protected Fragment getFragment() {
    Intent intent = getIntent();
    FragmentManager manager = getSupportFragmentManager();
    Fragment fragment = manager.findFragmentByTag(FRAGMENT_TAG);
    if (fragment == null) {
        if (FacebookDialogFragment.TAG.equals(intent.getAction())) {
            FacebookDialogFragment dialogFragment = new FacebookDialogFragment();
            dialogFragment.setRetainInstance(true);
            dialogFragment.show(manager, FRAGMENT_TAG);
            fragment = dialogFragment;
        } else if (DeviceShareDialogFragment.TAG.equals(intent.getAction())) {
            DeviceShareDialogFragment dialogFragment = new DeviceShareDialogFragment();
            dialogFragment.setRetainInstance(true);
            dialogFragment.setShareContent((ShareContent) intent.getParcelableExtra("content"));
            dialogFragment.show(manager, FRAGMENT_TAG);
            fragment = dialogFragment;
        } else {
            fragment = new LoginFragment();
            fragment.setRetainInstance(true);
            manager.beginTransaction().add(R.id.com_facebook_fragment_container, fragment, FRAGMENT_TAG).commit();
        }
    }
    return fragment;
}
Also used : FragmentManager(android.support.v4.app.FragmentManager) FacebookDialogFragment(com.facebook.internal.FacebookDialogFragment) Intent(android.content.Intent) DeviceShareDialogFragment(com.facebook.share.internal.DeviceShareDialogFragment) FacebookDialogFragment(com.facebook.internal.FacebookDialogFragment) Fragment(android.support.v4.app.Fragment) LoginFragment(com.facebook.login.LoginFragment) DeviceShareDialogFragment(com.facebook.share.internal.DeviceShareDialogFragment) LoginFragment(com.facebook.login.LoginFragment) ShareContent(com.facebook.share.model.ShareContent)

Example 58 with DialogFragment

use of android.support.v4.app.DialogFragment in project android-advancedrecyclerview by h6ah4i.

the class DraggableSwipeableExampleActivity method onItemPinned.

/**
     * This method will be called when a list item is pinned
     *
     * @param position The position of the item within data set
     */
public void onItemPinned(int position) {
    final DialogFragment dialog = ItemPinnedMessageDialogFragment.newInstance(position);
    getSupportFragmentManager().beginTransaction().add(dialog, FRAGMENT_TAG_ITEM_PINNED_DIALOG).commit();
}
Also used : ItemPinnedMessageDialogFragment(com.h6ah4i.android.example.advrecyclerview.common.fragment.ItemPinnedMessageDialogFragment) DialogFragment(android.support.v4.app.DialogFragment)

Example 59 with DialogFragment

use of android.support.v4.app.DialogFragment in project android-advancedrecyclerview by h6ah4i.

the class SwipeableExampleActivity method onItemPinned.

/**
     * This method will be called when a list item is pinned
     *
     * @param position The position of the item within data set
     */
public void onItemPinned(int position) {
    final DialogFragment dialog = ItemPinnedMessageDialogFragment.newInstance(position);
    getSupportFragmentManager().beginTransaction().add(dialog, FRAGMENT_TAG_ITEM_PINNED_DIALOG).commit();
}
Also used : ItemPinnedMessageDialogFragment(com.h6ah4i.android.example.advrecyclerview.common.fragment.ItemPinnedMessageDialogFragment) DialogFragment(android.support.v4.app.DialogFragment)

Example 60 with DialogFragment

use of android.support.v4.app.DialogFragment in project android-advancedrecyclerview by h6ah4i.

the class SwipeOnLongPressExampleActivity method onItemPinned.

/**
     * This method will be called when a list item is pinned
     *
     * @param position The position of the item within data set
     */
public void onItemPinned(int position) {
    final DialogFragment dialog = ItemPinnedMessageDialogFragment.newInstance(position);
    getSupportFragmentManager().beginTransaction().add(dialog, FRAGMENT_TAG_ITEM_PINNED_DIALOG).commit();
}
Also used : ItemPinnedMessageDialogFragment(com.h6ah4i.android.example.advrecyclerview.common.fragment.ItemPinnedMessageDialogFragment) DialogFragment(android.support.v4.app.DialogFragment)

Aggregations

DialogFragment (android.support.v4.app.DialogFragment)85 Fragment (android.support.v4.app.Fragment)31 FragmentTransaction (android.support.v4.app.FragmentTransaction)24 Bundle (android.os.Bundle)10 FragmentManager (android.support.v4.app.FragmentManager)9 View (android.view.View)8 SherlockDialogFragment (com.actionbarsherlock.app.SherlockDialogFragment)8 TextView (android.widget.TextView)7 AlertDialog (android.app.AlertDialog)5 DialogInterface (android.content.DialogInterface)4 OnClickListener (android.content.DialogInterface.OnClickListener)4 Intent (android.content.Intent)4 ListFragment (android.support.v4.app.ListFragment)4 AppCompatDialogFragment (android.support.v7.app.AppCompatDialogFragment)4 OnClickListener (android.view.View.OnClickListener)4 Button (android.widget.Button)4 ItemPinnedMessageDialogFragment (com.h6ah4i.android.example.advrecyclerview.common.fragment.ItemPinnedMessageDialogFragment)4 ProgressDialogFragment (com.wada811.android.dialogfragments.material.ProgressDialogFragment)4 Dialog (android.app.Dialog)3 ProgressDialogFragment (com.wada811.android.dialogfragments.traditional.ProgressDialogFragment)3