From 34a16cdd9ebd3d4ef6399d3dd9b394fa7e8bff25 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Reimar=20D=C3=B6ffinger?= Date: Sat, 29 Oct 2016 14:43:02 +0200 Subject: [PATCH] Show dictionary list on normal click. With the swap action button there is no need to hide this in the long-press action. I remember it took me fairly long to find my way out of the dictionary again the first time... --- .../android/dictionary/DictionaryActivity.java | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/com/hughes/android/dictionary/DictionaryActivity.java b/src/com/hughes/android/dictionary/DictionaryActivity.java index 8575fa6..4b14714 100644 --- a/src/com/hughes/android/dictionary/DictionaryActivity.java +++ b/src/com/hughes/android/dictionary/DictionaryActivity.java @@ -301,6 +301,12 @@ public class DictionaryActivity extends ActionBarActivity { if (query != null) getIntent().putExtra(C.SEARCH_TOKEN, query); } + if (intentAction != null && intentAction.equals(Intent.ACTION_SEND)) + { + String query = intent.getStringExtra(Intent.EXTRA_TEXT); + if (query != null) + getIntent().putExtra(C.SEARCH_TOKEN, query); + } /* * This processes text on M+ devices where QuickDic shows up in the context menu. */ @@ -532,15 +538,8 @@ public class DictionaryActivity extends ActionBarActivity { languageButton.setScaleType(ScaleType.FIT_CENTER); languageButton.setOnClickListener(new OnClickListener() { @Override - public void onClick(View arg0) { - onLanguageButtonClick(); - } - }); - languageButton.setOnLongClickListener(new OnLongClickListener() { - @Override - public boolean onLongClick(View v) { + public void onClick(View v) { onLanguageButtonLongClick(v.getContext()); - return true; } }); languageButton.setAdjustViewBounds(true); -- 2.43.0