List of usage examples for android.app DialogFragment show
public int show(FragmentTransaction transaction, String tag)
From source file:com.hybris.mobile.activity.AbstractProductDetailActivity.java
/** * Show delivery information in a dialog * //from ww w.ja v a 2 s .c o m * @param view */ public void showDeliveryInformation(View view) { DialogFragment fragment = TextDialogFragment.newInstance(getString(R.string.delivery_information_label), "", this); fragment.show(getFragmentManager(), "text_fragment"); }
From source file:se.leap.bitmaskclient.ConfigurationWizard.java
/** * Open the new provider dialog with data *///ww w . j a v a2 s .c o m public void addAndSelectNewProvider(String main_url) { FragmentTransaction fragment_transaction = fragment_manager.removePreviousFragment(NewProviderDialog.TAG); DialogFragment newFragment = new NewProviderDialog(); Bundle data = new Bundle(); data.putString(Provider.MAIN_URL, main_url); newFragment.setArguments(data); newFragment.show(fragment_transaction, NewProviderDialog.TAG); }
From source file:de.uulm.graphicalpasswords.openmiba.MIBALoginActivity.java
public void checkIfFinished() { if (current_round == min_rounds + 1) { tableLayout.setOnClickListener(null); DialogFragment dialog; if (buildPasswordString().equals(password)) { dialog = new ResultOKDialog(); } else {//www .j av a 2 s . com dialog = new WrongResultDialog(); } dialog.show(getFragmentManager(), "result"); } }
From source file:com.hybris.mobile.activity.AbstractProductDetailActivity.java
/** * Show the description in a dialog/*from w w w . j a va 2s . co m*/ * * @param view */ public void showDescription(View view) { DialogFragment fragment = TextDialogFragment.newInstance(getString(R.string.generic_title_description), mProduct.getDescription(), this); fragment.show(getFragmentManager(), "text_fragment"); }
From source file:com.hybris.mobile.activity.AbstractProductDetailActivity.java
/** * Show a number picker in a dialog// w w w . j av a2 s. c o m * * @param view */ public void showQuantityPicker(View view) { // Get the quantity if (mProduct.getStock().getStockLevel() > 0) { // Create and show the picker DialogFragment fragment = QuantityDialogFragment.newInstance(quantityToAddToCart, mProduct.getStock().getStockLevel(), this); fragment.show(getFragmentManager(), "quantity_fragment"); } }
From source file:com.hybris.mobile.activity.AbstractProductDetailActivity.java
/** * Show more information in a dialog/*from w ww . j a v a 2 s . c o m*/ * * @param view */ public void showMoreInformation(View view) { DialogFragment fragment = ClassificationListFragment.newInstance(getString(R.string.more_information_label), mProduct.getClassifications(), this); fragment.show(getFragmentManager(), "classification_fragment"); }
From source file:org.restcomm.android.olympus.MainActivity.java
@Override public boolean onOptionsItemSelected(MenuItem item) { // Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml. int id = item.getItemId(); if (id == R.id.action_settings) { Intent i = new Intent(this, SettingsActivity.class); startActivity(i);/*from www.j a va 2 s . c o m*/ } if (id == R.id.action_submit_logs) { Intent intent = new Intent(this, BugReportActivity.class); //intent.setAction(RCDevice.ACTION_OUTGOING_CALL); //intent.putExtra(RCDevice.EXTRA_DID, parsedUriString); //intent.putExtra(RCDevice.EXTRA_VIDEO_ENABLED, true); startActivity(intent); } if (id == R.id.action_about) { DialogFragment newFragment = AboutFragment.newInstance(); newFragment.show(getFragmentManager(), "dialog-about"); } return super.onOptionsItemSelected(item); }
From source file:com.example.vedantn.algaeestimator.MainActivity.java
@Override public boolean onOptionsItemSelected(MenuItem item) { // Handle action bar item clicks here. The action bar will // automatically handle clicks on the Home/Up button, so long // as you specify a parent activity in AndroidManifest.xml. int id = item.getItemId(); //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } else if (id == R.id.exit_the_app) { DialogFragment exitFragment = new ExitDialog(); exitFragment.show(getFragmentManager(), "exitDialog"); }/* ww w .j av a 2 s . c om*/ return super.onOptionsItemSelected(item); }
From source file:com.notalenthack.blaster.CommandActivity.java
private void launchCommand(Command cmd) { FragmentTransaction ft = getFragmentManager().beginTransaction(); Fragment prev = getFragmentManager().findFragmentByTag(LaunchCommandDialog.TAG_LAUNCH_DIALOG); if (prev != null) { ft.remove(prev);/*from w w w .ja v a 2s . c om*/ } ft.addToBackStack(null); // Create and show the dialog. DialogFragment newFragment = LaunchCommandDialog.newInstance(cmd, this); newFragment.show(ft, LaunchCommandDialog.TAG_LAUNCH_DIALOG); }
From source file:com.notalenthack.blaster.CommandActivity.java
private void editCommand(Command command) { FragmentTransaction ft = getFragmentManager().beginTransaction(); Fragment prev = getFragmentManager().findFragmentByTag(EditCommandDialog.TAG_EDIT_COMMAND_DIALOG); if (prev != null) { ft.remove(prev);// w w w . j ava 2s .c o m } ft.addToBackStack(null); // Create and show the dialog. DialogFragment newFragment = EditCommandDialog.newInstance(command, this); newFragment.show(ft, EditCommandDialog.TAG_EDIT_COMMAND_DIALOG); }