I have a TextView on my 'settings' activity:
<TextView
android:id="@+id/review"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"
android:background="#FFFFFF"
android:drawablePadding="15dp"
android:gravity="center_vertical"
android:text="@string/review"
android:textColor="#595959"
android:textColorLink="#595959"
android:textSize="12sp"
android:textStyle="bold"
app:drawableLeftCompat="@drawable/ic_review"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.055"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/view"
app:layout_constraintVertical_bias="0.876" />
I have defined my URL on the string.
<string name="review"><a href="https://play.google.com/store">Submit a review</a></string>
On my settings.kt page I have the following code onCreate:
val mTextView = findViewById<TextView>(R.id.review)
mTextView.movementMethod = LinkMovementMethod.getInstance()
From what I have found, I need to add a 'spannable' in relation to the above (settings.kt) but I'm not sure how to apply it, as everyone adds hyperlinks differently.