Giter Site home page Giter Site logo

wlzyj / hwtxtreader Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bifan-wei/hwtxtreader

0.0 0.0 0.0 89.59 MB

小说阅读器、轻量级Txt播放器 、文本播放组件、txt文件加载控件、Android阅读器。你可以通过该库快速实现加载播放txt文件,支持常见的阅读器设置操作。

Java 100.00%

hwtxtreader's Introduction

image
一分钟让你的app快速集成一个简洁漂亮的小说阅读器!
HwTxtReader 长期更新维护,打造一个简单易用的文本阅读控件,欢迎使用与支持!


目前实现了的功能:

  • 字体设置与调节。包括大小、颜色、是否加粗。
  • 页面风格设置,夜间模式等。
  • 进度跳转与当前进度获取。
  • 章节获取与章节跳转。
  • 完美翻页效果,支持滑盖翻页、平移翻页切换、剪切翻页切换,支持轻击翻页。
  • 可以进行长按滑动选择复制文字。
  • 数字与英文字符显示特点颜色。
  • 自动跳转到上次阅读进度。
  • 支持设置段落间距。
  • 支持竖向排版
  • 支持点击手机本地txt文件后,可以选择该阅读器打开

看不到图片?查看这里CSDN

2021/06/12 最新更新:适配Android X!凭兴趣爱好维护!如有帮助欢迎start支持!

image

2019/06/30更新:增加剪切翻页风格!超级漂亮!

image

演示demo



apk下载

目前demo效果图:

image

image

使用方法:


添加hwtxtreaderlib依赖

allprojects {
repositories {
   ...
   maven { url 'https://jitpack.io' }
}

dependencies {
           implementation 'com.github.bifan-wei:HwTxtReader:V2.2'	      
   	}
   	

使用默认界面使用的话,只需要一句代码:

   HwTxtPlayActivity.loadTxtFile(this, FilePath);
     

使用自定义view的话,直接使用TxtReaderView (详细请看Wiki) xml中:

      <com.bifan.txtreaderlib.main.TxtReaderView 
        android:id="@+id/activity_hwtxtplay_readerView" 
        android:layout_width="match_parent"  
        android:layout_height="match_parent" 
       />
       

代码中调用loadTxtFile方法直接加载文件:

mTxtReaderView.loadTxtFile(FilePath, new ILoadListener() { 
           @Override 
           public void onSuccess() { 
            //加载成功回调 
               initWhenLoadDone(); 
           } 

           @Override 
           public void onFail(TxtMsg txtMsg) { 
              //加载失败回调 
           } 

           @Override 
           public void onMessage(String message) {  
           //加载过程信息回调 
           } 
       }); 
   


hwtxtreader's People

Contributors

bifan-wei avatar huangwei 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.