1
0
Fork 0
mirror of https://github.com/geometer/FBReaderJ.git synced 2025-10-04 18:29:23 +02:00

updated TODOs; better ColorDict integration

This commit is contained in:
Nikolay Pultsin 2010-12-23 18:56:41 +00:00
parent 41a5751a14
commit 2845087bd0
25 changed files with 136 additions and 88 deletions

View file

@ -19,9 +19,7 @@
package org.geometerplus.android.fbreader;
import android.app.SearchManager;
import android.content.ActivityNotFoundException;
import android.content.ComponentName;
import android.content.Intent;
import android.net.Uri;
import android.widget.Toast;
@ -78,18 +76,13 @@ class ProcessHyperlinkAction extends FBAction {
if (start == end) {
return;
}
Intent intent = new Intent(Intent.ACTION_SEARCH);
intent.setComponent(new ComponentName(
"com.socialnmobile.colordict",
"com.socialnmobile.colordict.activity.Main"
));
intent.putExtra(SearchManager.QUERY, text.substring(start, end));
final Intent intent = DictionaryUtil.getDictionaryIntent(text.substring(start, end));
try {
myBaseActivity.startActivity(intent);
} catch(ActivityNotFoundException e){
Toast.makeText(
myBaseActivity,
ZLResource.resource("errorMessage").getResource("dictNotInstalled").getValue(),
ZLResource.resource("errorMessage").getResource("dictionaryIsNotInstalled").getValue(),
Toast.LENGTH_LONG
).show();
}