本文整理匯總了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);
}
}