Giter Club home page Giter Club logo

folioreader-tibetan's Introduction

folioReader-Tibetan

FolioReader-Android及Aria的实现电子书阅读器

其实使用起来很方便,对藏文完美支持,好像知乎也用了。也没有深入去研究写,主要看到两个项目优点多,几行代码就搞定!

FolioReader Features

  • Custom Fonts
  • Custom Text Size
  • Themes / Day mode / Night mode
  • Text Highlighting
  • List / Edit / Delete Highlights
  • Handle Internal and External Links
  • Portrait / Landscape
  • Reading Time Left / Pages left
  • In-App Dictionary
  • Media Overlays (Sync text rendering with audio playback)
  • TTS - Text to Speech Support
  • Book Search
  • Add Notes to a Highlight
  • Last Read Position Listener
  • Horizontal reading
  • Distraction Free Reading

Aria has the following characteristics

  • can be used in Activity, Service, Fragment, Dialog, popupWindow, Notification and other components
  • support the task of automatic scheduling, the user does not need to care about the state of the task switch logic
  • Through the Aria event, it is easy to get the download status of the current download task
  • a code plus can get the current download speed
  • a code can be dynamically set the maximum number of downloads
  • code to achieve speed limit
  • It is easy to modify the number of download threads by modifying the configuration file
  • priority to download a task

工具

使用

在manifest中配置权限

<uses-permission android:name="android.permission.MOUNT_UNMOUNT_FILESYSTEMS"
        tools:ignore="ProtectedPermissions" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>

另外加一行配置Android9.0的

<application android:networkSecurityConfig="@xml/network_security_config">

之后在相应的/res/xml/network_security_config.xml配置

<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
    <domain-config cleartextTrafficPermitted="true">
        <domain includeSubdomains="true">127.0.0.1</domain>
        <domain includeSubdomains="true">localhost</domain>
    </domain-config>
</network-security-config>

在仓库中添加依赖包

    implementation "com.folioreader:folioreader:0.5.1"
    implementation 'com.arialyy.aria:aria-core:3.5.1'
    annotationProcessor 'com.arialyy.aria:aria-compiler:3.5.1'

下载

                Aria.download(this)
                        .load(DOWNLOAD_URL)
                        .setFilePath(filepath,true)
                        .start();
               

打开 folioReader.openBook("sdcard/bookeader/1.epub");

之后运行测试

在这里插入图片描述

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.