Giter Club home page Giter Club logo

hwtxtreader's Introduction

image
想要快速实现文本播放显示功能么?HwTxtReader 是一个轻量级文本播放控件,能帮助你快速集成加载播放小说文本文件功能,同时内置默认的播放页面,能让你快速集成一个简洁漂亮的小说阅读器


目前实现了的功能:

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

演示demo



apk下载
image

更新日志请查看 updateLog.txt文件


目前demo效果图:

image

image

使用方法:


添加hwtxtreaderlib依赖

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

dependencies {
           compile 'com.github.bifan-wei:HwTxtReader:V2.1.1'
           //注意Android support 版本请使用27+
   	}
   	

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

   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) {  
           //加载过程信息回调 
           } 
       }); 
   


如果你觉得还不错,欢迎start支持。

hwtxtreader's People

Contributors

bifan-wei avatar huangwei avatar

Watchers

James Cloos 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.