本文整理汇总了Java中org.geometerplus.android.util.UIUtil.showErrorMessage方法的典型用法代码示例。如果您正苦于以下问题:Java UIUtil.showErrorMessage方法的具体用法?Java UIUtil.showErrorMessage怎么用?Java UIUtil.showErrorMessage使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.geometerplus.android.util.UIUtil
的用法示例。
在下文中一共展示了UIUtil.showErrorMessage方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: openTreeInternal
import org.geometerplus.android.util.UIUtil; //导入方法依赖的package包/类
private void openTreeInternal(FBTree tree, FBTree treeToSelect, boolean storeInHistory) {
switch (tree.getOpeningStatus()) {
case READY_TO_OPEN:
case ALWAYS_RELOAD_BEFORE_OPENING:
if (storeInHistory && !myCurrentKey.equals(tree.getUniqueKey())) {
myHistory.add(myCurrentKey);
}
onNewIntent(new Intent(this, getClass())
.setAction(OPEN_TREE_ACTION)
.putExtra(TREE_KEY_KEY, tree.getUniqueKey())
.putExtra(
SELECTED_TREE_KEY_KEY,
treeToSelect != null ? treeToSelect.getUniqueKey() : null
)
.putExtra(HISTORY_KEY, myHistory)
);
break;
case CANNOT_OPEN:
UIUtil.showErrorMessage(TreeActivity.this, tree.getOpeningStatusMessage());
break;
}
}
示例2: onNewIntent
import org.geometerplus.android.util.UIUtil; //导入方法依赖的package包/类
@Override
protected void onNewIntent(Intent intent) {
Log.i("MAIN", "onNewIntent");
OrientationUtil.setOrientation(this, intent);
if (!Intent.ACTION_SEARCH.equals(intent.getAction())) {
return;
}
String pattern = intent.getStringExtra(SearchManager.QUERY);
Log.i("MAIN", pattern + "");
myBookmarkSearchPatternOption.setValue(pattern);
final LinkedList<Bookmark> bookmarks = new LinkedList<Bookmark>();
pattern = pattern.toLowerCase();
for (Bookmark b : myAllBooksAdapter.bookmarks()) {
Log.i("MAIN", b.getText());
if (MiscUtil.matchesIgnoreCase(b.getText(), pattern)) {
bookmarks.add(b);
}
}
//
if (!bookmarks.isEmpty()) {
showSearchResultsTab(bookmarks);
} else {
UIUtil.showErrorMessage(this, "bookmarkNotFound");
}
}
示例3: gotoBookmark
import org.geometerplus.android.util.UIUtil; //导入方法依赖的package包/类
private void gotoBookmark(Bookmark bookmark) {
bookmark.markAsAccessed();
myCollection.saveBookmark(bookmark);
final Book book = myCollection.getBookById(bookmark.getBookId());
if (book != null) {
CoreReadActivity.openBookActivity(this, book, bookmark);
} else {
UIUtil.showErrorMessage(this, "cannotOpenBook");
}
}
示例4: installDictionary
import org.geometerplus.android.util.UIUtil; //导入方法依赖的package包/类
private static void installDictionary(Activity activity, PackageInfo dictionaryInfo) {
if (!PackageUtil.installFromMarket(activity, dictionaryInfo.PackageName)) {
UIUtil.showErrorMessage(activity, "cannotRunAndroidMarket", dictionaryInfo.Title);
}
}