本文整理汇总了Java中org.geometerplus.fbreader.fbreader.FBReaderApp类的典型用法代码示例。如果您正苦于以下问题:Java FBReaderApp类的具体用法?Java FBReaderApp怎么用?Java FBReaderApp使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
FBReaderApp类属于org.geometerplus.fbreader.fbreader包,在下文中一共展示了FBReaderApp类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import org.geometerplus.fbreader.fbreader.FBReaderApp; //导入依赖的package包/类
@AfterViews
public void init( )
{
tv_head.setText(App.getNowReadBook().name);
Thread.setDefaultUncaughtExceptionHandler(new org.geometerplus.zlibrary.ui.android.library.UncaughtExceptionHandler(this));
final FBReaderApp fbreader = (FBReaderApp) ZLApplication.Instance();
final TOCTree root = fbreader.Model.TOCTree;
myAdapter = new TOCAdapter(root);
final ZLTextWordCursor cursor = fbreader.BookTextView.getStartCursor();
int index = cursor.getParagraphIndex();
if (cursor.isEndOfParagraph())
{
++index;
}
TOCTree treeToSelect = fbreader.getCurrentTOCElement();
myAdapter.selectItem(treeToSelect);
mySelectedItem = treeToSelect;
}
示例2: onCreate
import org.geometerplus.fbreader.fbreader.FBReaderApp; //导入依赖的package包/类
@Override
public void onCreate(Bundle bundle) {
super.onCreate(bundle);
//
bar=this.getActionBar();
bar.setTitle(R.string.title_toc);
bar.setDisplayHomeAsUpEnabled(true);
bar.setDisplayShowHomeEnabled(true);
bar.setDisplayShowTitleEnabled(true);
//
final FBReaderApp fbreader = (FBReaderApp)ZLApplication.Instance();
final TOCTree root = fbreader.Model.TOCTree;
myAdapter = new TOCAdapter(root);
final ZLTextWordCursor cursor = fbreader.BookTextView.getStartCursor();
int index = cursor.getParagraphIndex();
if (cursor.isEndOfParagraph()) {
++index;
}
TOCTree treeToSelect = fbreader.getCurrentTOCElement();
myAdapter.selectItem(treeToSelect);
mySelectedItem = treeToSelect;
}
示例3: run
import org.geometerplus.fbreader.fbreader.FBReaderApp; //导入依赖的package包/类
@Override
protected void run(Object ... params) {
if (!Reader.jumpBack()) {
final List<FBReaderApp.CancelActionDescription> descriptionList =
Reader.getCancelActionsList();
if (descriptionList.size() == 1) {
Reader.closeWindow();
} else {
final Intent intent = new Intent();
intent.setClass(BaseActivity, CancelActivity.class);
intent.putExtra(CancelActivity.LIST_SIZE, descriptionList.size());
int index = 0;
for (FBReaderApp.CancelActionDescription description : descriptionList) {
intent.putExtra(CancelActivity.ITEM_TITLE + index, description.Title);
intent.putExtra(CancelActivity.ITEM_SUMMARY + index, description.Summary);
++index;
}
BaseActivity.startActivityForResult(intent, CoreReadActivity.REQUEST_CANCEL_MENU);
}
}
}
示例4: onSearchRequested
import org.geometerplus.fbreader.fbreader.FBReaderApp; //导入依赖的package包/类
@Override
public boolean onSearchRequested() {
final FBReaderApp.PopupPanel popup = myFBReaderApp.getActivePopup();
myFBReaderApp.hideActivePopup();
final SearchManager manager = (SearchManager) getSystemService(SEARCH_SERVICE);
manager.setOnCancelListener(new SearchManager.OnCancelListener() {
public void onCancel() {
if (popup != null) {
myFBReaderApp.showPopup(popup.getId());
}
manager.setOnCancelListener(null);
}
});
startSearch(myFBReaderApp.TextSearchPatternOption.getValue(), true,
null, false);
return true;
}
示例5: onItemClick
import org.geometerplus.fbreader.fbreader.FBReaderApp; //导入依赖的package包/类
@Override
public void onItemClick(AdapterView<?> parent, View view, int position, long id)
{
final FBReaderApp fbreaderApp = (FBReaderApp) FBReaderApp.Instance();
switch (((MenuItem) parent.getAdapter().getItem(position)).ation)
{
case MenuItem.ATION_TOC:
this.dismiss();
if (fbreaderApp.Model.TOCTree.hasChildren() && App.getNowReadBook().isEpub()) fbreaderApp.runAction(ActionCode.SHOW_TOC);
else {
IntentKit.startSubIntent(context, TocActivity.class);
((Activity)context).overridePendingTransition(R.anim.activity_bottom_in, R.anim.keep_y);
}
break;
case MenuItem.ATION_SETTING:
this.dismiss();
fbreaderApp.runAction(ActionCode.SHOW_PREFERENCES);
break;
case MenuItem.ATION_FONT_ADD:
fbreaderApp.runAction(ActionCode.INCREASE_FONT);
break;
case MenuItem.ATION_FONT_DIM:
fbreaderApp.runAction(ActionCode.DECREASE_FONT);
break;
case MenuItem.ATION_NIGHT:
if (ColorProfile.DAY.equals(fbreaderApp.getColorProfileName())) fbreaderApp.runAction(ActionCode.SWITCH_TO_NIGHT_PROFILE);
else fbreaderApp.runAction(ActionCode.SWITCH_TO_DAY_PROFILE);
break;
case MenuItem.ATION_PROGRESS:
this.dismiss();
fbreaderApp.runAction(ActionCode.SHOW_NAVIGATION);
break;
}
}
示例6: openBookText
import org.geometerplus.fbreader.fbreader.FBReaderApp; //导入依赖的package包/类
void openBookText(TOCTree tree)
{
final TOCTree.Reference reference = tree.getReference();
if (reference != null)
{
finish();
final FBReaderApp fbreader = (FBReaderApp) ZLApplication.Instance();
fbreader.addInvisibleBookmark();
fbreader.BookTextView.gotoPosition(reference.ParagraphIndex, 0, 0);
fbreader.showBookTextView();
}
}
示例7: hideSelectionPanel
import org.geometerplus.fbreader.fbreader.FBReaderApp; //导入依赖的package包/类
public void hideSelectionPanel()
{
final FBReaderApp.PopupPanel popup = myFBReaderApp.getActivePopup();
if (popup != null && popup.getId() == SelectionPopup.ID)
{
myFBReaderApp.hideActivePopup();
}
}
示例8: openBookText
import org.geometerplus.fbreader.fbreader.FBReaderApp; //导入依赖的package包/类
void openBookText(TOCTree tree) {
final TOCTree.Reference reference = tree.getReference();
if (reference != null) {
finish();
final FBReaderApp fbreader = (FBReaderApp)ZLApplication.Instance();
fbreader.addInvisibleBookmark();
fbreader.BookTextView.gotoPosition(reference.ParagraphIndex, 0, 0);
fbreader.showBookTextView();
}
}
示例9: ShowTOCAction
import org.geometerplus.fbreader.fbreader.FBReaderApp; //导入依赖的package包/类
ShowTOCAction(FBReader baseActivity, FBReaderApp fbreader) {
super(baseActivity, fbreader);
}
示例10: ShowMenuAction
import org.geometerplus.fbreader.fbreader.FBReaderApp; //导入依赖的package包/类
ShowMenuAction(FBReader baseActivity, FBReaderApp fbreader) {
super(baseActivity, fbreader);
}
示例11: FBAndroidAction
import org.geometerplus.fbreader.fbreader.FBReaderApp; //导入依赖的package包/类
FBAndroidAction(FBReader baseActivity, FBReaderApp fbreader) {
super(fbreader);
BaseActivity = baseActivity;
}
示例12: SelectionShowPanelAction
import org.geometerplus.fbreader.fbreader.FBReaderApp; //导入依赖的package包/类
SelectionShowPanelAction(FBReader baseActivity, FBReaderApp fbreader) {
super(baseActivity, fbreader);
}
示例13: SelectionTranslateAction
import org.geometerplus.fbreader.fbreader.FBReaderApp; //导入依赖的package包/类
SelectionTranslateAction(FBReader baseActivity, FBReaderApp fbreader) {
super(baseActivity, fbreader);
}
示例14: SelectionPopup
import org.geometerplus.fbreader.fbreader.FBReaderApp; //导入依赖的package包/类
SelectionPopup(FBReaderApp fbReader) {
super(fbReader);
}
示例15: PopupPanel
import org.geometerplus.fbreader.fbreader.FBReaderApp; //导入依赖的package包/类
PopupPanel(FBReaderApp fbReader) {
super(fbReader);
}