当前位置: 首页>>代码示例>>Java>>正文


Java FBReaderApp类代码示例

本文整理汇总了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;
}
 
开发者ID:AlixMing,项目名称:FBreader,代码行数:21,代码来源:TOCActivity.java

示例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;
}
 
开发者ID:liufeiit,项目名称:itmarry,代码行数:23,代码来源:TOCActivity.java

示例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);
		}
	}
}
 
开发者ID:liufeiit,项目名称:itmarry,代码行数:22,代码来源:ShowCancelMenuAction.java

示例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;
}
 
开发者ID:liufeiit,项目名称:itmarry,代码行数:18,代码来源:CoreReadActivity.java

示例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;
	}
}
 
开发者ID:AlixMing,项目名称:FBreader,代码行数:37,代码来源:MenuPop.java

示例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();
	}
}
 
开发者ID:AlixMing,项目名称:FBreader,代码行数:13,代码来源:TOCActivity.java

示例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();
	}
}
 
开发者ID:AlixMing,项目名称:FBreader,代码行数:9,代码来源:FBReader.java

示例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();
	}
}
 
开发者ID:liufeiit,项目名称:itmarry,代码行数:11,代码来源:TOCActivity.java

示例9: ShowTOCAction

import org.geometerplus.fbreader.fbreader.FBReaderApp; //导入依赖的package包/类
ShowTOCAction(FBReader baseActivity, FBReaderApp fbreader) {
	super(baseActivity, fbreader);
}
 
开发者ID:AlixMing,项目名称:FBreader,代码行数:4,代码来源:ShowTOCAction.java

示例10: ShowMenuAction

import org.geometerplus.fbreader.fbreader.FBReaderApp; //导入依赖的package包/类
ShowMenuAction(FBReader baseActivity, FBReaderApp fbreader) {
	super(baseActivity, fbreader);
}
 
开发者ID:AlixMing,项目名称:FBreader,代码行数:4,代码来源:ShowMenuAction.java

示例11: FBAndroidAction

import org.geometerplus.fbreader.fbreader.FBReaderApp; //导入依赖的package包/类
FBAndroidAction(FBReader baseActivity, FBReaderApp fbreader) {
	super(fbreader);
	BaseActivity = baseActivity;
}
 
开发者ID:AlixMing,项目名称:FBreader,代码行数:5,代码来源:FBAndroidAction.java

示例12: SelectionShowPanelAction

import org.geometerplus.fbreader.fbreader.FBReaderApp; //导入依赖的package包/类
SelectionShowPanelAction(FBReader baseActivity, FBReaderApp fbreader) {
	super(baseActivity, fbreader);
}
 
开发者ID:AlixMing,项目名称:FBreader,代码行数:4,代码来源:SelectionShowPanelAction.java

示例13: SelectionTranslateAction

import org.geometerplus.fbreader.fbreader.FBReaderApp; //导入依赖的package包/类
SelectionTranslateAction(FBReader baseActivity, FBReaderApp fbreader) {
	super(baseActivity, fbreader);
}
 
开发者ID:AlixMing,项目名称:FBreader,代码行数:4,代码来源:SelectionTranslateAction.java

示例14: SelectionPopup

import org.geometerplus.fbreader.fbreader.FBReaderApp; //导入依赖的package包/类
SelectionPopup(FBReaderApp fbReader) {
	super(fbReader);
}
 
开发者ID:AlixMing,项目名称:FBreader,代码行数:4,代码来源:SelectionPopup.java

示例15: PopupPanel

import org.geometerplus.fbreader.fbreader.FBReaderApp; //导入依赖的package包/类
PopupPanel(FBReaderApp fbReader) {
	super(fbReader);
}
 
开发者ID:AlixMing,项目名称:FBreader,代码行数:4,代码来源:PopupPanel.java


注:本文中的org.geometerplus.fbreader.fbreader.FBReaderApp类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。