diff options
| author | Bananeweizen <bananeweizen@gmx.de> | 2015-01-31 07:53:10 +0100 |
|---|---|---|
| committer | Bananeweizen <bananeweizen@gmx.de> | 2015-01-31 07:53:10 +0100 |
| commit | a29ffa627fb26d2838fb85de27f479c8b1c22f2c (patch) | |
| tree | 0f1939e2585d1038ddb72b29a9c39339781f769a /main/src/cgeo/geocaching/compatibility/Compatibility.java | |
| parent | 1cfd08a7db0682548718998edbadd920c12e464d (diff) | |
| download | cgeo-a29ffa627fb26d2838fb85de27f479c8b1c22f2c.zip cgeo-a29ffa627fb26d2838fb85de27f479c8b1c22f2c.tar.gz cgeo-a29ffa627fb26d2838fb85de27f479c8b1c22f2c.tar.bz2 | |
#4605 explicitly set system text selectable after filling
This may or may not fix the issue.
Diffstat (limited to 'main/src/cgeo/geocaching/compatibility/Compatibility.java')
| -rw-r--r-- | main/src/cgeo/geocaching/compatibility/Compatibility.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/main/src/cgeo/geocaching/compatibility/Compatibility.java b/main/src/cgeo/geocaching/compatibility/Compatibility.java index 54e2966..ad16172 100644 --- a/main/src/cgeo/geocaching/compatibility/Compatibility.java +++ b/main/src/cgeo/geocaching/compatibility/Compatibility.java @@ -5,15 +5,18 @@ import org.eclipse.jdt.annotation.NonNull; import android.app.Activity; import android.graphics.Point; import android.os.Build; +import android.widget.TextView; public final class Compatibility { private static final int SDK_VERSION = Build.VERSION.SDK_INT; + private static final AndroidLevel11Interface LEVEL_11; private static final AndroidLevel13Interface LEVEL_13; private static final AndroidLevel19Interface LEVEL_19; static { + LEVEL_11 = SDK_VERSION >= 11 ? new AndroidLevel11() : new AndroidLevel11Emulation(); LEVEL_13 = SDK_VERSION >= 13 ? new AndroidLevel13() : new AndroidLevel13Emulation(); LEVEL_19 = SDK_VERSION >= 19 ? new AndroidLevel19() : new AndroidLevel19Emulation(); } @@ -30,11 +33,15 @@ public final class Compatibility { return LEVEL_13.getDisplaySize(); } - public static void importGpxFromStorageAccessFramework(final @NonNull Activity activity, int requestCodeImportGpx) { + public static void importGpxFromStorageAccessFramework(final @NonNull Activity activity, final int requestCodeImportGpx) { LEVEL_19.importGpxFromStorageAccessFramework(activity, requestCodeImportGpx); } public static boolean isStorageAccessFrameworkAvailable() { return SDK_VERSION >= 19; } + + public static void setTextIsSelectable(final TextView textView, final boolean selectable) { + LEVEL_11.setTextIsSelectable(textView, selectable); + } } |
