X-Git-Url: https://gitweb.stoutner.com/?p=PrivacyBrowserAndroid.git;a=blobdiff_plain;f=app%2Fsrc%2Fmain%2Fjava%2Fcom%2Fstoutner%2Fprivacybrowser%2Fadapters%2FHistoryArrayAdapter.java;h=be6d11a807e2ddfdbc0e6730c9d0f998d9c4578d;hp=0ebed74a14273b31b8c1fd85a5f6ea4f1edad9e8;hb=012e5595c82d6e8d0b8a46f1ef18a02a56341182;hpb=80187b7215a5effdbe97ac48e8af34824a05c287 diff --git a/app/src/main/java/com/stoutner/privacybrowser/adapters/HistoryArrayAdapter.java b/app/src/main/java/com/stoutner/privacybrowser/adapters/HistoryArrayAdapter.java index 0ebed74a..be6d11a8 100644 --- a/app/src/main/java/com/stoutner/privacybrowser/adapters/HistoryArrayAdapter.java +++ b/app/src/main/java/com/stoutner/privacybrowser/adapters/HistoryArrayAdapter.java @@ -1,5 +1,5 @@ /* - * Copyright © 2016-2017 Soren Stoutner . + * Copyright © 2016-2018 Soren Stoutner . * * This file is part of Privacy Browser . * @@ -40,7 +40,7 @@ public class HistoryArrayAdapter extends ArrayAdapter { private final int currentPage; public HistoryArrayAdapter(Context context, ArrayList historyArrayList, int currentPageId) { - // We need to call `super` from the base `ArrayAdapter`. `0` is the `textViewResourceId`. + // `super` must be called from the base `ArrayAdapter`. `0` is the `textViewResourceId`, which is unused. super(context, 0, historyArrayList); // Store `currentPageId` in the class variable. @@ -50,15 +50,15 @@ public class HistoryArrayAdapter extends ArrayAdapter { @Override @NonNull public View getView(int position, View convertView, @NonNull ViewGroup parent) { - // Inflate the view if it is `null`. + // Inflate the view if it is null. if (convertView == null) { // `false` does not attach `url_history_item_linearlayout` to `parent`. convertView = LayoutInflater.from(getContext()).inflate(R.layout.url_history_item_linearlayout, parent, false); } // Get handles for `favoriteIconImageView` and `urlTextView`. - ImageView favoriteIconImageView = (ImageView) convertView.findViewById(R.id.history_favorite_icon_imageview); - TextView urlTextView = (TextView) convertView.findViewById(R.id.history_url_textview); + ImageView favoriteIconImageView = convertView.findViewById(R.id.history_favorite_icon_imageview); + TextView urlTextView = convertView.findViewById(R.id.history_url_textview); // Get the URL history for this position. History history = getItem(position);