Search in sources :

Example 6 with DialogFragment

use of android.app.DialogFragment in project xabber-android by redsolution.

the class MucPrivateChatInvitationDialog method newInstance.

public static DialogFragment newInstance(String account, String contact) {
    DialogFragment fragment = new MucPrivateChatInvitationDialog();
    setArguments(account, contact, fragment);
    return fragment;
}
Also used : DialogFragment(android.app.DialogFragment)

Example 7 with DialogFragment

use of android.app.DialogFragment in project NotificationPeekPort by lzanita09.

the class DialogHelper method showHelpDialog.

public static void showHelpDialog(Activity activity) {
    FragmentManager fm = activity.getFragmentManager();
    FragmentTransaction ft = fm.beginTransaction();
    ((DialogFragment) Fragment.instantiate(activity, HelpDialogFragment.class.getName())).show(ft, ABOUT_DIALOG_TAG);
}
Also used : FragmentManager(android.app.FragmentManager) FragmentTransaction(android.app.FragmentTransaction) DialogFragment(android.app.DialogFragment)

Example 8 with DialogFragment

use of android.app.DialogFragment in project FluxyAndroidTodo by armueller.

the class TodoListArrayAdapter method setHolderListeners.

private void setHolderListeners(final ViewHolder holder, final TodoItem item) {
    holder.todoDescription.setOnLongClickListener(new View.OnLongClickListener() {

        @Override
        public boolean onLongClick(View v) {
            DialogFragment editOrDeleteDialog = new EditOrDeleteDialogFragment();
            Bundle args = new Bundle();
            args.putLong("todoItemId", item.getId());
            editOrDeleteDialog.setArguments(args);
            editOrDeleteDialog.show(activity.getFragmentManager(), String.valueOf(item.getId()));
            return true;
        }
    });
    holder.todoEditDescription.setOnEditorActionListener(new TextView.OnEditorActionListener() {

        @Override
        public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
            boolean handled = false;
            if (actionId == EditorInfo.IME_ACTION_DONE) {
                actionCreator.createEditTodoAction(item.getId(), v.getText().toString());
                handled = true;
            }
            return handled;
        }
    });
    holder.todoCheckBox.setOnClickListener(new View.OnClickListener() {

        @Override
        public void onClick(View v) {
            actionCreator.createToggleTodoCompleteAction(item.getId());
        }
    });
}
Also used : KeyEvent(android.view.KeyEvent) Bundle(android.os.Bundle) DialogFragment(android.app.DialogFragment) TextView(android.widget.TextView) InjectView(butterknife.InjectView) TextView(android.widget.TextView) View(android.view.View)

Example 9 with DialogFragment

use of android.app.DialogFragment in project cardslib by gabrielemariotti.

the class MainActivity method openDialogFragment.

private void openDialogFragment(DialogFragment dialogStandardFragment) {
    if (dialogStandardFragment != null) {
        FragmentManager fm = getFragmentManager();
        FragmentTransaction ft = fm.beginTransaction();
        Fragment prev = fm.findFragmentByTag("carddemo_dialog");
        if (prev != null) {
            ft.remove(prev);
        }
        //ft.addToBackStack(null);
        dialogStandardFragment.show(ft, "carddemo_dialog");
    }
}
Also used : FragmentManager(android.app.FragmentManager) FragmentTransaction(android.app.FragmentTransaction) BaseFragment(it.gmariotti.cardslib.demo.fragment.BaseFragment) ThumbnailFragment(it.gmariotti.cardslib.demo.fragment.v1.ThumbnailFragment) GridBaseFragment(it.gmariotti.cardslib.demo.fragment.v1.GridBaseFragment) ListGplayCursorCardCABFragment(it.gmariotti.cardslib.demo.fragment.v1.ListGplayCursorCardCABFragment) GridGplayCABFragment(it.gmariotti.cardslib.demo.fragment.v1.GridGplayCABFragment) ListSectionedCardFragment(it.gmariotti.cardslib.demo.fragment.v1.ListSectionedCardFragment) BirthDayCardFragment(it.gmariotti.cardslib.demo.fragment.v1.BirthDayCardFragment) GridGplayFragment(it.gmariotti.cardslib.demo.fragment.v1.GridGplayFragment) DismissAnimFragment(it.gmariotti.cardslib.demo.fragment.v1.DismissAnimFragment) ShadowFragment(it.gmariotti.cardslib.demo.fragment.v1.ShadowFragment) ListCursorCardFragment(it.gmariotti.cardslib.demo.fragment.v1.ListCursorCardFragment) ListColorFragment(it.gmariotti.cardslib.demo.fragment.v1.ListColorFragment) ListDifferentInnerBaseFragment(it.gmariotti.cardslib.demo.fragment.v1.ListDifferentInnerBaseFragment) GPlayCardFragment(it.gmariotti.cardslib.demo.fragment.v1.GPlayCardFragment) ListGplayCardCABFragment(it.gmariotti.cardslib.demo.fragment.v1.ListGplayCardCABFragment) CardFragment(it.gmariotti.cardslib.demo.fragment.v1.CardFragment) StockCardFragment(it.gmariotti.cardslib.demo.fragment.v1.StockCardFragment) ListGplayUndoCardFragment(it.gmariotti.cardslib.demo.fragment.v1.ListGplayUndoCardFragment) GridCursorCardFragment(it.gmariotti.cardslib.demo.fragment.v1.GridCursorCardFragment) CardExpandFragment(it.gmariotti.cardslib.demo.fragment.v1.CardExpandFragment) CardWithListFragment(it.gmariotti.cardslib.demo.fragment.v1.CardWithListFragment) DialogFragment(android.app.DialogFragment) ListBaseFragment(it.gmariotti.cardslib.demo.fragment.v1.ListBaseFragment) Fragment(android.app.Fragment) MiscCardFragment(it.gmariotti.cardslib.demo.fragment.v1.MiscCardFragment) ListExpandCardFragment(it.gmariotti.cardslib.demo.fragment.v1.ListExpandCardFragment) ListGplayCardFragment(it.gmariotti.cardslib.demo.fragment.v1.ListGplayCardFragment) ChangeValueCardFragment(it.gmariotti.cardslib.demo.fragment.v1.ChangeValueCardFragment) HeaderFragment(it.gmariotti.cardslib.demo.fragment.v1.HeaderFragment)

Example 10 with DialogFragment

use of android.app.DialogFragment in project Resurrection_packages_apps_Settings by ResurrectionRemix.

the class ActionListViewSettings method showDialogInner.

private void showDialogInner(int id, int which, boolean longpress, boolean newAction) {
    DialogFragment newFragment = MyAlertDialogFragment.newInstance(id, which, longpress, newAction);
    newFragment.setTargetFragment(this, 0);
    newFragment.show(getFragmentManager(), "dialog " + id);
}
Also used : DialogFragment(android.app.DialogFragment)

Aggregations

DialogFragment (android.app.DialogFragment)45 Fragment (android.app.Fragment)10 FragmentManager (android.app.FragmentManager)7 FragmentTransaction (android.app.FragmentTransaction)7 ConfirmationDialogFragment (com.fsck.k9.fragment.ConfirmationDialogFragment)3 Intent (android.content.Intent)2 Bundle (android.os.Bundle)2 View (android.view.View)2 TextView (android.widget.TextView)2 GPSAlertDialogFragment (com.agup.gps.fragments.GPSAlertDialogFragment)2 NetworkAlertDialogFragment (com.agup.gps.fragments.NetworkAlertDialogFragment)2 BackupAccountsDialogFragment (com.decad3nce.aegis.Fragments.BackupAccountsDialogFragment)2 ProgressDialogFragment (com.fsck.k9.fragment.ProgressDialogFragment)2 BaseFragment (it.gmariotti.cardslib.demo.fragment.BaseFragment)2 Activity (android.app.Activity)1 DevicePolicyManager (android.app.admin.DevicePolicyManager)1 BroadcastReceiver (android.content.BroadcastReceiver)1 ComponentName (android.content.ComponentName)1 Context (android.content.Context)1 IntentFilter (android.content.IntentFilter)1