From fdce3ea0feeb6329e6e205f6b73e99954274b431 Mon Sep 17 00:00:00 2001 From: Konrad Renner Date: Wed, 23 Mar 2016 22:53:16 +0100 Subject: [PATCH] links are clickable, if using the stock Android text editor --- app/build.gradle | 4 ++-- .../org/kore/kolabnotes/android/fragment/DetailFragment.java | 2 ++ .../kore/kolabnotes/android/fragment/OverviewFragment.java | 3 +++ app/src/main/res/layout/fragment_detail.xml | 2 ++ 4 files changed, 9 insertions(+), 2 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 2a8299d..89b7178 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -8,8 +8,8 @@ android { applicationId "org.kore.kolabnotes.android" minSdkVersion 16 targetSdkVersion 23 - versionCode 63 - versionName "1.10.1" + versionCode 64 + versionName "1.10.2" //Running test testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" diff --git a/app/src/main/java/org/kore/kolabnotes/android/fragment/DetailFragment.java b/app/src/main/java/org/kore/kolabnotes/android/fragment/DetailFragment.java index bc845ef..18463fc 100644 --- a/app/src/main/java/org/kore/kolabnotes/android/fragment/DetailFragment.java +++ b/app/src/main/java/org/kore/kolabnotes/android/fragment/DetailFragment.java @@ -21,6 +21,7 @@ import android.text.Html; import android.text.Spanned; import android.text.TextUtils; +import android.text.method.LinkMovementMethod; import android.util.Base64; import android.util.Log; import android.view.LayoutInflater; @@ -189,6 +190,7 @@ public void onFocusChange(View view, boolean b) { }else{ editText = (EditText) activity.findViewById(R.id.detail_description_plain); editText.setVisibility(View.VISIBLE); + editText.setMovementMethod(LinkMovementMethod.getInstance()); } // Handle Back Navigation :D diff --git a/app/src/main/java/org/kore/kolabnotes/android/fragment/OverviewFragment.java b/app/src/main/java/org/kore/kolabnotes/android/fragment/OverviewFragment.java index 0a15960..8aac26f 100644 --- a/app/src/main/java/org/kore/kolabnotes/android/fragment/OverviewFragment.java +++ b/app/src/main/java/org/kore/kolabnotes/android/fragment/OverviewFragment.java @@ -1286,6 +1286,8 @@ protected void onPostExecute(String s) { .setAutoCancel(true).build(); notificationManager.notify(0, notification); + + reloadData(); } } @@ -1392,6 +1394,7 @@ protected void onPostExecute(String s) { .setAutoCancel(true).build(); notificationManager.notify(random.nextInt(), notification); + reloadData(); } } diff --git a/app/src/main/res/layout/fragment_detail.xml b/app/src/main/res/layout/fragment_detail.xml index e11baac..32215b3 100644 --- a/app/src/main/res/layout/fragment_detail.xml +++ b/app/src/main/res/layout/fragment_detail.xml @@ -298,6 +298,8 @@ android:textColorHint="@color/secondary_text_default_material_light" android:hint="@string/description_hint" android:editable="true" + android:autoLink="all" + android:linksClickable="true" android:bufferType="spannable" android:enabled="true" />