diff options
author | Samuel Tardieu <sam@rfc1149.net> | 2014-04-13 21:47:19 +0200 |
---|---|---|
committer | Samuel Tardieu <sam@rfc1149.net> | 2014-04-13 21:47:48 +0200 |
commit | 76fff2d672a0791c3ae96f4b09c4d82819462a83 (patch) | |
tree | 1d0e58fe5b97fba2f8cca8fbaff9637191d45998 | |
parent | 8f96bc60e14e1168127fcd68d1425132fcda4e02 (diff) | |
download | cgeo-76fff2d672a0791c3ae96f4b09c4d82819462a83.zip cgeo-76fff2d672a0791c3ae96f4b09c4d82819462a83.tar.gz cgeo-76fff2d672a0791c3ae96f4b09c4d82819462a83.tar.bz2 |
fix #3761: crash when long-clicking on a value field
-rw-r--r-- | main/src/cgeo/geocaching/CacheDetailActivity.java | 2 | ||||
-rw-r--r-- | main/src/cgeo/geocaching/activity/AbstractActivity.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/main/src/cgeo/geocaching/CacheDetailActivity.java b/main/src/cgeo/geocaching/CacheDetailActivity.java index f525955..e95d250 100644 --- a/main/src/cgeo/geocaching/CacheDetailActivity.java +++ b/main/src/cgeo/geocaching/CacheDetailActivity.java @@ -357,7 +357,7 @@ public class CacheDetailActivity extends AbstractViewPagerActivity<CacheDetailAc case R.id.value: // coordinates, gc-code, name assert view instanceof TextView; clickedItemText = ((TextView) view).getText(); - final String itemTitle = (String) ((TextView) ((View) view.getParent()).findViewById(R.id.name)).getText(); + final CharSequence itemTitle = ((TextView) ((View) view.getParent()).findViewById(R.id.name)).getText(); buildDetailsContextMenu(menu, clickedItemText, itemTitle, true); break; case R.id.shortdesc: diff --git a/main/src/cgeo/geocaching/activity/AbstractActivity.java b/main/src/cgeo/geocaching/activity/AbstractActivity.java index fd83043..f57ae41 100644 --- a/main/src/cgeo/geocaching/activity/AbstractActivity.java +++ b/main/src/cgeo/geocaching/activity/AbstractActivity.java @@ -146,7 +146,7 @@ public abstract class AbstractActivity extends FragmentActivity implements IAbst new Keyboard(this).show(view); } - protected void buildDetailsContextMenu(final ContextMenu menu, final CharSequence clickedItemText, final String fieldTitle, final boolean copyOnly) { + protected void buildDetailsContextMenu(final ContextMenu menu, final CharSequence clickedItemText, final CharSequence fieldTitle, final boolean copyOnly) { menu.setHeaderTitle(fieldTitle); getMenuInflater().inflate(R.menu.details_context, menu); menu.findItem(R.id.menu_translate_to_sys_lang).setVisible(!copyOnly); |