X-Git-Url: https://gitweb.stoutner.com/?a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fstoutner%2Fprivacybrowser%2Fdialogs%2FUrlHistoryDialog.java;fp=app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fstoutner%2Fprivacybrowser%2Fdialogs%2FUrlHistoryDialog.java;h=9b9d9f610ca82346a56e05b25b86c06369e6283a;hb=012e5595c82d6e8d0b8a46f1ef18a02a56341182;hp=0093810222990dbde1bd479f2bdd53874f1d8dc8;hpb=80187b7215a5effdbe97ac48e8af34824a05c287;p=PrivacyBrowserAndroid.git diff --git a/app/src/main/java/com/stoutner/privacybrowser/dialogs/UrlHistoryDialog.java b/app/src/main/java/com/stoutner/privacybrowser/dialogs/UrlHistoryDialog.java index 00938102..9b9d9f61 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/dialogs/UrlHistoryDialog.java +++ b/app/src/main/java/com/stoutner/privacybrowser/dialogs/UrlHistoryDialog.java @@ -31,7 +31,8 @@ import android.graphics.drawable.Drawable; import android.os.Bundle; import android.support.annotation.NonNull; import android.support.v4.content.ContextCompat; -// We have to use `AppCompatDialogFragment` instead of `DialogFragment` or an error is produced on API <= 22. `android.support.v7.app.AlertDialog` also uses more of the horizontal screen real estate versus `android.app.AlertDialog's` smaller width. +// `AppCompatDialogFragment` must be used instead of `DialogFragment` or an error is produced on API <= 22. +// `android.support.v7.app.AlertDialog` also uses more of the horizontal screen real estate versus `android.app.AlertDialog's` smaller width. import android.support.v7.app.AppCompatDialogFragment; import android.util.Base64; import android.view.LayoutInflater; @@ -239,7 +240,7 @@ public class UrlHistoryDialog extends AppCompatDialogFragment{ alertDialog.show(); // Instantiate a `HistoryArrayAdapter`. - final HistoryArrayAdapter historyArrayAdapter = new HistoryArrayAdapter(getContext(), historyArrayList, currentPageId); + HistoryArrayAdapter historyArrayAdapter = new HistoryArrayAdapter(getContext(), historyArrayList, currentPageId); // Get a handle for the list view. ListView listView = alertDialog.findViewById(R.id.history_listview); @@ -249,7 +250,7 @@ public class UrlHistoryDialog extends AppCompatDialogFragment{ // Listen for clicks on entries in the list view. listView.setOnItemClickListener((AdapterView parent, View view, int position, long id) -> { - // Convert the `long` `id` to an `int`. + // Convert the long ID to an int. int itemId = (int) id; // Only consume the click if it is not on the `currentPageId`.