aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorBananeweizen <bananeweizen@gmx.de>2015-04-07 11:10:09 +0200
committerBananeweizen <bananeweizen@gmx.de>2015-04-07 11:10:09 +0200
commit5d67902a5b558bf471bb837f7b3fe963fc529a39 (patch)
tree2aa58dd76769568070dc4f38147b755df0d9cda6 /main
parent79ae8aa24230aede02192fecc56ac0c6eb0aa7b7 (diff)
downloadcgeo-5d67902a5b558bf471bb837f7b3fe963fc529a39.zip
cgeo-5d67902a5b558bf471bb837f7b3fe963fc529a39.tar.gz
cgeo-5d67902a5b558bf471bb837f7b3fe963fc529a39.tar.bz2
fix #4835: cannot copy cache coordinates
Diffstat (limited to 'main')
-rw-r--r--main/res/values/changelog_release.xml1
-rw-r--r--main/src/cgeo/geocaching/CacheDetailActivity.java6
-rw-r--r--main/src/cgeo/geocaching/TrackableActivity.java5
3 files changed, 11 insertions, 1 deletions
diff --git a/main/res/values/changelog_release.xml b/main/res/values/changelog_release.xml
index ead9986..587f48d 100644
--- a/main/res/values/changelog_release.xml
+++ b/main/res/values/changelog_release.xml
@@ -4,6 +4,7 @@
<string name="changelog_release" translatable="false">\n
<b>next bugfix release</b>\n
· Fix: wrong log count shown after logging something else than a found
+ · Fix: copy to clipboard not possible on Android 5.1
\n
\n
<b>Known Limitations/Bugs:</b>\n
diff --git a/main/src/cgeo/geocaching/CacheDetailActivity.java b/main/src/cgeo/geocaching/CacheDetailActivity.java
index 758dc78..4f0c4d2 100644
--- a/main/src/cgeo/geocaching/CacheDetailActivity.java
+++ b/main/src/cgeo/geocaching/CacheDetailActivity.java
@@ -1805,6 +1805,10 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
@Override
public boolean onPrepareActionMode(final ActionMode actionMode, final Menu menu) {
+ return prepareClipboardActionMode(view, actionMode, menu);
+ }
+
+ private boolean prepareClipboardActionMode(final View view, final ActionMode actionMode, final Menu menu) {
switch (view.getId()) {
case R.id.value: // coordinates, gc-code, name
assert view instanceof TextView;
@@ -1856,7 +1860,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc
@Override
public boolean onCreateActionMode(final ActionMode actionMode, final Menu menu) {
actionMode.getMenuInflater().inflate(R.menu.details_context, menu);
-
+ prepareClipboardActionMode(view, actionMode, menu);
// Return true so that the action mode is shown
return true;
}
diff --git a/main/src/cgeo/geocaching/TrackableActivity.java b/main/src/cgeo/geocaching/TrackableActivity.java
index 0b4e27a..7d10d34 100644
--- a/main/src/cgeo/geocaching/TrackableActivity.java
+++ b/main/src/cgeo/geocaching/TrackableActivity.java
@@ -561,6 +561,10 @@ public class TrackableActivity extends AbstractViewPagerActivity<TrackableActivi
@Override
public boolean onPrepareActionMode(final ActionMode actionMode, final Menu menu) {
+ return prepareClipboardActionMode(view, actionMode, menu);
+ }
+
+ private boolean prepareClipboardActionMode(final View view, final ActionMode actionMode, final Menu menu) {
final int viewId = view.getId();
assert view instanceof TextView;
clickedItemText = ((TextView) view).getText();
@@ -590,6 +594,7 @@ public class TrackableActivity extends AbstractViewPagerActivity<TrackableActivi
@Override
public boolean onCreateActionMode(final ActionMode actionMode, final Menu menu) {
actionMode.getMenuInflater().inflate(R.menu.details_context, menu);
+ prepareClipboardActionMode(view, actionMode, menu);
return true;
}