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");
}
});
}
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");
}
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();
}
}
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");
}
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");
}
Aggregations