Comments (8)
I'm sorry for late reply. Are you setting the text outside of the ui thread?
from textjustify-android.
Hi.
No, I'm working only on the main thread. Seems like the iterator.add() at line 379 conflicts with unitIterator.next() at line 222.
from textjustify-android.
Can you provide your code that loads the data into textview? Thanks. I'll look at this tonight.
from textjustify-android.
Actually I made it very simple for testing purpose.
documentView = (DocumentView) findViewById(R.id.documentView);
documentView.getDocumentLayoutParams().setTextAlignment(TextAlignment.JUSTIFIED);
documentView.getDocumentLayoutParams().setHyphenator(new Hyphenator(HyphenPattern.PT));
documentView.getDocumentLayoutParams().setHyphenated(true);
documentView.setText(getString(R.string.mancini), true);
And the string resource:
<string name="mancini">Vágner Mancini hoje é um sujeito tão angustiado quanto otimista, por mais que pareça uma contradição. O técnico do Botafogo tem a difícil missão de salvar o time do rebaixamento no Campeonato Brasileiro, apesar de todas as dificuldades que o próprio clube impõe a seu trabalho - salários atrasados, afastamento de jogadores importantes, dívidas que ameaçam até as poucas chances que ainda existem de permanência na Série A em 2015. Na manhã desta segunda-feira, Mancini falou ao blog.</string>
from textjustify-android.
@muriloandrade Good find. I have fixed the bug in the latest push. I have added a test to the sample app as well.
EDIT. Bugs persist. Let me fix.
from textjustify-android.
@muriloandrade Fixed
from textjustify-android.
Thank you for the fix.
But now I'm getting the text justified but not hyphenated.
I may be missing a step, so, no rush, but can you provide me an example on how to use?
Thank you again.
from textjustify-android.
@muriloandrade It does hyphenate. I have put your exact code into the the sample demo which you can download at https://play.google.com/store/apps/details?id=com.bluejamesbond.text.sample
Just click on the "Hyphenated Test"
from textjustify-android.
Related Issues (20)
- How to set RTL for Arabic Text
- Extra space in AlertDialog
- max line limit HOT 1
- com.bluejamesbond.text.StringDocumentLayout$PlainDocumentException: Cannot fit word(s) into one line. Font size too large? HOT 2
- is Html text Support ?
- bug java.lang.IllegalArgumentException:
- How to change the text size? HOT 3
- java.lang.IndexOutOfBoundsException HOT 2
- Crash on Android 7.X
- DocumentViews in LinearLayout and EventListeners
- Background Color does not change with Spannables, please help.
- DocumentView has a problem with ExpandableListView
- RTL supprot for documentView_textFormat="plain"
- Broken on API 21 when change portrait to landscape positions
- Hyphenate license
- Image Span test does not work
- Report crash .onMeasure
- How to use android:ellipsize="end" attributes????
- bug: java.lang.IllegalArgumentException: width and height must be > 0
- onClick in Clickablespan is not work HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from textjustify-android.