src/main/java/de/blau/android/dialogs/bookmarks/BookmarksDialog.java
/**
     * Builds show bookmarks dialog
     *
     * @param activity the calling activity
     * @param bookmarksStorages the bookmark arraylist
     * @return return the built alertdialog
     */
Builds show bookmarks dialog
@param activity the calling activity
@param bookmarksStorages the bookmark arraylist
@return return the built alertdialog
Builds show bookmarks dialog @param activity the calling activity @param bookmarksStorages the bookmark arraylist @return return the built alertdialog
@NonNull
    private AlertDialog bookmarkSelectDialog(@NonNull Activity activity, @NonNull ArrayList<BookmarksStorage> bookmarksStorages) {
        final AlertDialog.Builder builder = new AlertDialog.Builder(activity);
        final LayoutInflater themedInflater = ThemeUtils.getLayoutInflater(activity);
        final View layout = themedInflater.inflate(R.layout.bookmark_dialog, null);
        builder.setView(layout);
        builder.setTitle(R.string.bookmarkstitle);
        builder.setNegativeButton(R.string.done, null);
        dialog = builder.create();
        RecyclerView bookmarksList = layout.findViewById(R.id.bookmarkslist);
        LayoutParams viewLayoutParams = bookmarksList.getLayoutParams();
        viewLayoutParams.width = LayoutParams.MATCH_PARENT;
        LinearLayoutManager layoutManager = new LinearLayoutManager(activity);
        bookmarksList.setLayoutManager(layoutManager);
        adapter = new BookmarkListAdapter(bookmarksStorages, viewLayoutParams, this);
        bookmarksList.setAdapter(adapter);
        return dialog;
    }
@ NonNull private AlertDialog bookmarkSelectDialog ( @ NonNull Activity activity , @ NonNull ArrayList < BookmarksStorage > bookmarksStorages ) { final AlertDialog . Builder builder = new AlertDialog . Builder ( activity ) ; final LayoutInflater themedInflater = ThemeUtils . getLayoutInflater ( activity ) ; final View layout = themedInflater . inflate ( R . layout . bookmark_dialog , null ) ; builder . setView ( layout ) ; builder . setTitle ( R . string . bookmarkstitle ) ; builder . setNegativeButton ( R . string . done , null ) ; dialog = builder . create ( ) ; RecyclerView bookmarksList = layout . findViewById ( R . id . bookmarkslist ) ; LayoutParams viewLayoutParams = bookmarksList . getLayoutParams ( ) ; viewLayoutParams . width = LayoutParams . MATCH_PARENT ; LinearLayoutManager layoutManager = new LinearLayoutManager ( activity ) ; bookmarksList . setLayoutManager ( layoutManager ) ; adapter = new BookmarkListAdapter ( bookmarksStorages , viewLayoutParams , this ) ; bookmarksList . setAdapter ( adapter ) ; return dialog ; }
Builds show bookmarks dialog
 @param activity the calling activity
 @param bookmarksStorages the bookmark arraylist
 @return return the built alertdialog
Builds show bookmarks dialog @param activity the calling activity @param bookmarksStorages the bookmark arraylist @return return the built alertdialog