// Get the status of close-on-back, which is true when the domains activity is called from the options menu.
closeOnBack = intent.getBooleanExtra("close_on_back", false);
// Get the status of close-on-back, which is true when the domains activity is called from the options menu.
closeOnBack = intent.getBooleanExtra("close_on_back", false);
// Determine if we are in two pane mode. `domain_settings_fragment_container` does not exist on devices with a width less than 900dp.
twoPanedMode = (findViewById(R.id.domain_settings_fragment_container) != null);
// Determine if we are in two pane mode. `domain_settings_fragment_container` does not exist on devices with a width less than 900dp.
twoPanedMode = (findViewById(R.id.domain_settings_fragment_container) != null);
- // Show the add domain `AlertDialog`.
- DialogFragment addDomainDialog = new AddDomainDialog();
+ // Create an add domain dialog.
+ DialogFragment addDomainDialog = AddDomainDialog.addDomain(currentUrl);
+
+ // Show the add domain dialog.
// Populate the list of domains. `-1` highlights the first domain if in two-paned mode. It has no effect in single-paned mode.
populateDomainsListView(-1);
// Populate the list of domains. `-1` highlights the first domain if in two-paned mode. It has no effect in single-paned mode.
populateDomainsListView(-1);
fragmentManager.beginTransaction().replace(R.id.domains_listview_fragment_container, domainsListFragment).commit();
fragmentManager.executePendingTransactions();
fragmentManager.beginTransaction().replace(R.id.domains_listview_fragment_container, domainsListFragment).commit();
fragmentManager.executePendingTransactions();
// Display `domainSettingsFragment`.
fragmentManager.beginTransaction().replace(R.id.domains_listview_fragment_container, domainSettingsFragment).commit();
// Display `domainSettingsFragment`.
fragmentManager.beginTransaction().replace(R.id.domains_listview_fragment_container, domainSettingsFragment).commit();
// Populate the list of domains. `-1` highlights the first domain if in two-paned mode. It has no effect in single-paned mode.
populateDomainsListView(-1);
// Populate the list of domains. `-1` highlights the first domain if in two-paned mode. It has no effect in single-paned mode.
populateDomainsListView(-1);
if (twoPanedMode) { // The device in in two-paned mode.
populateDomainsListView(currentDomainDatabaseId);
} else { // The device is in single-paned mode.
if (twoPanedMode) { // The device in in two-paned mode.
populateDomainsListView(currentDomainDatabaseId);
} else { // The device is in single-paned mode.