Search in sources :

Example 86 with DialogFragment

use of android.app.DialogFragment in project coursera-android by aporter.

the class TimePickerFragmentActivity method onCreate.

@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);
    // Capture UI elements
    mTimeDisplay = (TextView) findViewById(R.id.timeDisplay);
    mPickTime = (Button) findViewById(R.id.pickTime);
    // Set an OnClickListener for the Change the Time Button
    mPickTime.setOnClickListener(new OnClickListener() {

        public void onClick(View v) {
            // Create a new DatePickerFragment
            DialogFragment newFragment = new TimePickerFragment();
            // Display DatePickerFragment
            newFragment.show(getFragmentManager(), "TimePicker");
        }
    });
}
Also used : DialogFragment(android.app.DialogFragment) OnClickListener(android.view.View.OnClickListener) TextView(android.widget.TextView) View(android.view.View)

Example 87 with DialogFragment

use of android.app.DialogFragment in project Klyph by jonathangerbaud.

the class AlbumVideosActivity method onVideoSelected.

@Override
public void onVideoSelected(Fragment fragment, Video video) {
    videoToDisplay = video;
    DialogFragment dialog = new VideoQualityDialog();
    dialog.show(getFragmentManager(), "VideoQualityDialog");
}
Also used : DialogFragment(android.app.DialogFragment) VideoQualityDialog(com.abewy.android.apps.klyph.fragment.VideoQualityDialog)

Example 88 with DialogFragment

use of android.app.DialogFragment in project AndroidChromium by JackyAndroid.

the class SyncCustomizationFragment method closeDialogIfOpen.

private void closeDialogIfOpen(String tag) {
    FragmentManager manager = getFragmentManager();
    if (manager == null) {
        // Do nothing if the manager doesn't exist yet; see http://crbug.com/480544.
        return;
    }
    DialogFragment df = (DialogFragment) manager.findFragmentByTag(tag);
    if (df != null) {
        df.dismiss();
    }
}
Also used : FragmentManager(android.app.FragmentManager) DialogFragment(android.app.DialogFragment)

Example 89 with DialogFragment

use of android.app.DialogFragment in project AisenWeiBo by wangdan.

the class CustomThemeColorFragment method launch.

public static void launch(Activity context) {
    Fragment fragment = context.getFragmentManager().findFragmentByTag("DialogFragment");
    if (fragment != null) {
        context.getFragmentManager().beginTransaction().remove(fragment).commit();
    }
    CustomThemeColorFragment dialogFragment = new CustomThemeColorFragment();
    dialogFragment.show(context.getFragmentManager(), "DialogFragment");
}
Also used : Fragment(android.app.Fragment) DialogFragment(android.app.DialogFragment)

Example 90 with DialogFragment

use of android.app.DialogFragment in project AisenWeiBo by wangdan.

the class MDColorsDialogFragment method launch.

public static void launch(Activity context) {
    Fragment fragment = context.getFragmentManager().findFragmentByTag("DMColorsDialogFragment");
    if (fragment != null) {
        context.getFragmentManager().beginTransaction().remove(fragment).commit();
    }
    MDColorsDialogFragment dialogFragment = new MDColorsDialogFragment();
    dialogFragment.show(context.getFragmentManager(), "DMColorsDialogFragment");
}
Also used : Fragment(android.app.Fragment) DialogFragment(android.app.DialogFragment)

Aggregations

DialogFragment (android.app.DialogFragment)110 InstrumentedDialogFragment (com.android.settings.core.instrumentation.InstrumentedDialogFragment)26 Fragment (android.app.Fragment)13 Activity (android.app.Activity)12 FragmentManager (android.app.FragmentManager)8 SelectPhoneAccountDialogFragment (com.android.contacts.common.widget.SelectPhoneAccountDialogFragment)8 FragmentTransaction (android.app.FragmentTransaction)7 PhoneAccountHandle (android.telecom.PhoneAccountHandle)7 SupportDisclaimerDialogFragment (com.android.settings.support.SupportDisclaimerDialogFragment)7 SupportPhoneDialogFragment (com.android.settings.support.SupportPhoneDialogFragment)7 SelectPhoneAccountListener (com.android.contacts.common.widget.SelectPhoneAccountDialogFragment.SelectPhoneAccountListener)6 Context (android.content.Context)5 Bundle (android.os.Bundle)5 CustomDialogPreference (com.android.settingslib.CustomDialogPreference)5 CustomEditTextPreference (com.android.settingslib.CustomEditTextPreference)5 Intent (android.content.Intent)4 KeyguardManager (android.app.KeyguardManager)3 ProgressDialog (android.app.ProgressDialog)3 Uri (android.net.Uri)3 TelephonyManager (android.telephony.TelephonyManager)3