Code Monkey home page Code Monkey logo

Comments (6)

mathew-kurian avatar mathew-kurian commented on July 28, 2024

Interesting. Can you provide me a screenshot showing the difference.

from textjustify-android.

khalid-hussain avatar khalid-hussain commented on July 28, 2024

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.

from textjustify-android.

mathew-kurian avatar mathew-kurian commented on July 28, 2024

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

mathew-kurian avatar mathew-kurian commented on July 28, 2024

Try 2.0.5 and let me know

from textjustify-android.

khalid-hussain avatar khalid-hussain commented on July 28, 2024

That did it. Thanks a lot.

from textjustify-android.

Edonfreiner avatar Edonfreiner commented on July 28, 2024

This issue is still not fixed for me.

from textjustify-android.

Related Issues (20)

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.