GithubHelp home page GithubHelp logo

wangfujia / fbreader-mupdf_library Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lurongshuang/fbreader-mupdf_library

0.0 0.0 0.0 18.3 MB

将 RBReader 与Mupdf代码进行整合 1.界面更加美观 2.引用更加方便

HTML 1.91% CSS 0.25% Java 58.14% Makefile 1.41% C++ 18.88% M4 0.08% Shell 8.03% C 11.02% Batchfile 0.01% Roff 0.14% Module Management System 0.04% Inno Setup 0.08% sed 0.01%

fbreader-mupdf_library's Introduction

RBReader-Mupdf_library

先上图-----------------------------------------------------------------

PDF阅读 功能界面1 功能界面2 护眼模式 阅读进度 默认阅读 字体放大 目录 书签 添加书签
将 RBReader 与Mupdf代码进行整合 1.界面更加美观 类似主流阅读器界面风格 2.引用更加方便     实现0代码加入 !!!!!!!!!!!!!!!!

曾经帅过的 发布者联系方式 2212709787(QQ)

FBReader全世界最大最好的交流群 321171877 (QQ->"FBReader")

!!!!!!!!!!!!!!!!!!!!!

******            先将项目引入修改包名*** ******************后在按照下方步骤

修改包名:包路径为: org.geometerplus.android.fbreader.api;

class类为:FBReaderIntents

修改类下变量 DEFAULT_PACKAGE 的值 改为主程序的包名

进行重新编译  gradle markeJar

添加步骤

1.将 library下aar  放到项目libs下

  1. compile(name: 'fBReader-release', ext: 'aar')

3.应用 AppApplication中 //初始化阅读器组件 ZLAndroidApplication.init(this);

4.提供便捷方法

 //判断 服务是否可以使用了
public static void bookInit(Context context) {
    if (bs == null) {
        bs = new BookCollectionShadow();
        bs.bindToService(context, null);
    }
}
 
 //跳转到 阅读界面
public void initBook(Context context, String filePath, String type) {
    if (bs == null) {
        bs = new BookCollectionShadow();
        bs.bindToService(context, null);
    }
    File file = new File(filePath);
    if (file.exists()) {
        Book book = bs.getBookByFile(filePath);
        if (type.equalsIgnoreCase("TXT") || type.equalsIgnoreCase("EPUB")) {
            //跳转阅读器
            FBReader.openBookActivity(context, book, null);
        } else if (type.equalsIgnoreCase("PDF")) {
            //跳转PDF阅读器
            Uri uri = Uri.parse(filePath);
            Intent intent = new Intent(context, MuPDFActivity.class);
            intent.setAction(Intent.ACTION_VIEW);
            intent.setData(uri);
            intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
            context.startActivity(intent);
        }
    }
}

fbreader-mupdf_library's People

Contributors

lurongshuang avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.