Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private SpannableString getClickableString() {
- SpannableString agreementText = new SpannableString(getString(R.string.review_no_reviews));
- ClickableSpan clickableSpan = new ClickableSpan() {
- @Override
- public void onClick(@NotNull View textView) {
- if (user.getLogin() == null) {
- LoginActivity.startActivityFromProduct(ProductActivity.this);
- } else {
- commentForm.setVisibility(View.VISIBLE);
- addFirstReviewText.setVisibility(View.GONE);
- }
- }
- };
- agreementText.setSpan(clickableSpan, 33, 55, Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
- return agreementText;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement