Comments (6)
Interesting. Can you provide me a screenshot showing the difference.
from textjustify-android.
Ah, yes. The following code is what I have in my adapter:
holder.tvDuaTranslation.getDocumentLayoutParams().setTextSize(prefOtherFontSize);
holder.tvDuaReference.setTextSize(prefOtherFontSize);
I have to multiply the same value for the documentView at least by 2 to get the same size (or at least what looks like the same to me) as the textView. The code for this:
holder.tvDuaTranslation.getDocumentLayoutParams().setTextSize(prefOtherFontSize * 2);
holder.tvDuaReference.setTextSize(prefOtherFontSize);
And the respective screenshot:
Thanks for your time.
from textjustify-android.
@khalid-hussain So I think the problem here is that I don't take the font in SP format. I take in raw textsize in pixels. I will address issue this soon but the workaround would be to compute the scaled pixel size (SP) and the pass it into setTextSize. The library will be updated in the next build for addressing this issue.
from textjustify-android.
Try 2.0.5 and let me know
from textjustify-android.
That did it. Thanks a lot.
from textjustify-android.
This issue is still not fixed for me.
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.