-public class UrlHistoryDialog extends AppCompatDialogFragment{
-
- // `historyArrayList` and `currentPageId` pass information from `onCreate()` to `onCreateDialog()`.
- private final ArrayList<History> historyArrayList = new ArrayList<>();
- private int currentPageId;
-
- public static UrlHistoryDialog loadBackForwardList(Context context, WebBackForwardList webBackForwardList) {
- // Create `argumentsBundle`.
- Bundle argumentsBundle = new Bundle();
-
- // Store `currentPageIndex`.
- int currentPageIndex = webBackForwardList.getCurrentIndex();
-
- // Setup `urlArrayList` and `iconArrayList`.
- ArrayList<String> urlArrayList = new ArrayList<>();
- ArrayList<String> iconBase64StringArrayList = new ArrayList<>();
+public class UrlHistoryDialog extends DialogFragment{
+ // The public interface is used to send information back to the parent activity.
+ public interface NavigateHistoryListener {
+ void navigateHistory(String url, int steps);
+ }