Git Product home page Git Product logo

rubyspan's Introduction

RubySpan

This project is not maintained any more. See this for more information.

Min SDK 21 (Android 5.0 Lollipop)

RubySpan is an attempt to display ruby annotation along with text using Android TextView. Compared to the WebView solution, using RubySpan with TextView is a lot faster, flexible and more friendly to layouts. Current implementation focuses on displaying furigana on Japanese kanji. But you can easilly adapt it to your application. The minimal API supported is API 21 (Android 5.0 Lollipop). Since layouting text is a complex thing, there're still some bugs and the result is not perfect if you compare it with that produced by the browser or WebView.

Screenshots

Text with RubySpan

Known Bugs

  1. Line breaking doesn't work properly on Android pre 5.0 and it's painful to solve this. So API lower than 21 is not supported.

  2. This is actually not a bug. Since RubySpan extends ReplacementSpan, it is not compatible with other (mostly) spans when used on the same text. You have to modify the source code if you want to add more features.

  3. The first character of a line will not be rendered properly if it needs to be indented to display its long annotation. AFAIK, this is technically unresolvable.

License

Copyright (c) 2016 Minglangjun Li
Licensed under the Apache License, Version 2.0

rubyspan's People

Contributors

mljli 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.