private void updateWatchlistBox(final CacheDetailActivity activity) {
            final boolean supportsWatchList = cache.supportsWatchList();
            binding.watchlistBox.setVisibility(supportsWatchList ? View.VISIBLE : View.GONE);
            if (!supportsWatchList) {
                return;
            }

            final int watchListCount = cache.getWatchlistCount();

            if (cache.isOnWatchlist() || cache.isOwner()) {
                binding.addToWatchlist.setVisibility(View.GONE);
                binding.removeFromWatchlist.setVisibility(View.VISIBLE);
                if (watchListCount != -1) {
                    binding.watchlistText.setText(activity.res.getString(R.string.cache_watchlist_on_extra, watchListCount));
                } else {
                    binding.watchlistText.setText(R.string.cache_watchlist_on);
                }
            } else {
                binding.addToWatchlist.setVisibility(View.VISIBLE);
                binding.removeFromWatchlist.setVisibility(View.GONE);
                if (watchListCount != -1) {
                    binding.watchlistText.setText(activity.res.getString(R.string.cache_watchlist_not_on_extra, watchListCount));
                } else {
                    binding.watchlistText.setText(R.string.cache_watchlist_not_on);
                }
            }

            // the owner of a cache has it always on his watchlist. Adding causes an error
            if (cache.isOwner()) {
                binding.addToWatchlist.setEnabled(false);
                binding.addToWatchlist.setVisibility(View.GONE);
                binding.removeFromWatchlist.setEnabled(false);
                binding.removeFromWatchlist.setVisibility(View.GONE);
            }
        }
Show/hide buttons, set text in watchlist box
main/src/main/java/cgeo/geocaching/CacheDetailActivity.java