Source:
private void passInfoToSheet(Place place) { this.place = place; updateBookmarkButtonImage(this.place); bookmarkButton.setOnClickListener(view -> { boolean isBookmarked = bookmarkLocationDao.updateBookmarkLocation(this.place); updateBookmarkButtonImage(this.place); updateMarker(isBookmarked, this.place); }); wikipediaButton.setVisibility(place.hasWikipediaLink()==true?View.VISIBLE:View.GONE); wikipediaButton.setOnClickListener(view -> openWebView(this.place.siteLinks.getWikipediaLink())); wikidataButton.setVisibility(place.hasWikidataLink()==true?View.VISIBLE:View.GONE); wikidataButton.setOnClickListener(view -> openWebView(this.place.siteLinks.getWikidataLink())); directionsButton.setOnClickListener(view -> { Intent mapIntent = new Intent(Intent.ACTION_VIEW, this.place.location.getGmmIntentUri()); if (mapIntent.resolveActivity(getActivity().getPackageManager()) != null) { startActivity(mapIntent); } }); commonsButton.setVisibility(this.place.hasCommonsLink()==true?View.VISIBLE:View.GONE); commonsButton.setOnClickListener(view -> openWebView(this.place.siteLinks.getCommonsLink())); icon.setImageResource(this.place.getLabel().getIcon()); title.setText(this.place.name); distance.setText(this.place.distance); description.setText(this.place.getLongDescription()); fabCamera.setOnClickListener(view -> { if (fabCamera.isShown()) { Timber.d("Camera button tapped. Place: %s", this.place.toString()); storeSharedPrefs(); controller.initiateCameraPick(getActivity()); } }); fabGallery.setOnClickListener(view -> { if (fabGallery.isShown()) { Timber.d("Gallery button tapped. Place: %s", this.place.toString()); storeSharedPrefs(); controller.initiateGalleryPick(getActivity(), false); } }); }

Target:
private void passInfoToSheet(Place place) { this.place = place; updateBookmarkButtonImage(this.place); bookmarkButton.setOnClickListener(view -> { boolean isBookmarked = bookmarkLocationDao.updateBookmarkLocation(this.place); updateBookmarkButtonImage(this.place); updateMarker(isBookmarked, this.place); }); wikipediaButton.setVisibility(place.hasWikipediaLink()?View.VISIBLE:View.GONE); wikipediaButton.setOnClickListener(view -> openWebView(this.place.siteLinks.getWikipediaLink())); wikidataButton.setVisibility(place.hasWikidataLink()?View.VISIBLE:View.GONE); wikidataButton.setOnClickListener(view -> openWebView(this.place.siteLinks.getWikidataLink())); directionsButton.setOnClickListener(view -> { Intent mapIntent = new Intent(Intent.ACTION_VIEW, this.place.location.getGmmIntentUri()); if (mapIntent.resolveActivity(getActivity().getPackageManager()) != null) { startActivity(mapIntent); } }); commonsButton.setVisibility(this.place.hasCommonsLink()?View.VISIBLE:View.GONE); commonsButton.setOnClickListener(view -> openWebView(this.place.siteLinks.getCommonsLink())); icon.setImageResource(this.place.getLabel().getIcon()); title.setText(this.place.name); distance.setText(this.place.distance); description.setText(this.place.getLongDescription()); fabCamera.setOnClickListener(view -> { if (fabCamera.isShown()) { Timber.d("Camera button tapped. Place: %s", this.place.toString()); storeSharedPrefs(); controller.initiateCameraPick(getActivity()); } }); fabGallery.setOnClickListener(view -> { if (fabGallery.isShown()) { Timber.d("Gallery button tapped. Place: %s", this.place.toString()); storeSharedPrefs(); controller.initiateGalleryPick(getActivity(), false); } }); }