Closed khalid-hussain closed 9 years ago
Interesting. Can you provide me a screenshot showing the difference.
Ah, yes. The following code is what I have in my adapter:
holder.tvDuaTranslation.getDocumentLayoutParams().setTextSize(prefOtherFontSize);
holder.tvDuaReference.setTextSize(prefOtherFontSize);
And this is what I get:
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.
@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.
Try 2.0.5 and let me know
That did it. Thanks a lot.
This issue is still not fixed for me.
Hi there,
I currently have both a textView and a documentView (from this library) which the user is allowed to choose the font size for. Unfortunately the documentView scales differently from the textView when using the setTextSize(float) function. Is there something I'm missing?
The project I'm working on can be found here.
Thanks for the library and your time.