From cc70fe9a68416d7e71f91c183620c7cdfc7aecca Mon Sep 17 00:00:00 2001 From: qwerty287 Date: Fri, 28 May 2021 21:23:07 +0200 Subject: [PATCH] Make markdown links clickable (#916) Pr makes links in markdown clickable. Closes #797

- [X] I carefully read the [contribution guidelines](https://codeberg.org/GitNex/GitNex/src/branch/main/CONTRIBUTING.md). - [X] I'm following the code standards as defined [here](https://codeberg.org/gitnex/GitNex/wiki/Code-Standards). - [X] By submitting this pull request, I permit GitNex to license my work under the [GNU General Public License v3](https://codeberg.org/GitNex/GitNex/src/branch/main/LICENSE). Co-authored-by: qwerty287 Reviewed-on: https://codeberg.org/gitnex/GitNex/pulls/916 Reviewed-by: M M Arif Co-authored-by: qwerty287 Co-committed-by: qwerty287 --- app/src/main/java/org/mian/gitnex/helpers/Markdown.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/org/mian/gitnex/helpers/Markdown.java b/app/src/main/java/org/mian/gitnex/helpers/Markdown.java index 986661c7..a3c81282 100644 --- a/app/src/main/java/org/mian/gitnex/helpers/Markdown.java +++ b/app/src/main/java/org/mian/gitnex/helpers/Markdown.java @@ -3,6 +3,7 @@ package org.mian.gitnex.helpers; import android.content.Context; import android.graphics.Typeface; import android.text.Spanned; +import android.text.method.LinkMovementMethod; import android.widget.TextView; import androidx.annotation.NonNull; import androidx.core.content.res.ResourcesCompat; @@ -79,6 +80,7 @@ public class Markdown { public static void render(Context context, String markdown, TextView textView) { try { + textView.setMovementMethod(LinkMovementMethod.getInstance()); Renderer renderer = rendererPool.claim(timeout); if(renderer != null) {