jianzhongli / MathView

A library for displaying math formula in Android apps.
Apache License 2.0
1.01k stars 189 forks source link

Horizontal scrolling #45

Open manassharma07 opened 7 years ago

manassharma07 commented 7 years ago

I am using MathView to display matrices. Sometimes the matrices are big and can't be accomodated within the screen and go out of bounds. I want the user to be able to scroll them in such a case. But when i add a horizontal scrollview it isnt working at all. If it isnt possible then alternatively can we set the text to scale accordingly so that it fits the screen, though it wont be very good.

Thanks a lot for your library, waiting for a response. Thanks

nurdianws commented 7 years ago

I got similar problem as picture below. croppedimage

I want to scroll it horizontally, but the scroll event is disable.

Can I enable the scroll horizontal event listener ?

manassharma07 commented 7 years ago

@nurdianws Hi did you find a fix for this issue? or any other alternative solution? Please let me know

nurdianws commented 7 years ago

Hi Manas,

Thanks for your replay.

I have fixed my issue with auto linebreaks. I add linebreaks setting with true value for automatic.

Thanks

Nur Dian Wahyu Sambodo [image: https://]about.me/nurdianws https://about.me/nurdianws?promo=email_sig&utm_source=product&utm_medium=email_sig&utm_campaign=chrome_ext

On 31 May 2017 at 15:13, Manas Sharma notifications@github.com wrote:

@nurdianws https://github.com/nurdianws Hi did you find a fix for this issue? or any other alternative solution? Please let me know

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/kexanie/MathView/issues/45#issuecomment-305118271, or mute the thread https://github.com/notifications/unsubscribe-auth/Aa3dQ664815593BEsaiaMzRQuXgysggiks5r_SEQgaJpZM4MzVRQ .

FirdousNath commented 7 years ago

please share your code snippet @nurdianws

RanaRanvijaySingh commented 7 years ago

I am facing a similar issue. In my case, I have added horizontal scroll view on top of MathView. The issue is if I give "warp_content" to horizontal scroll view, MathView becomes too large in few rendering. So I had to fix the width but still, the entire text is not coming in MathView. Any suggestions.

HarishEdara commented 6 years ago

@nurdianws Hi can you please share the code for scrolling the MathView. how you can give linebreaks setting true to webview.

zengtianyu1215 commented 6 years ago

Hello above, I have solved this problem by disabling the MotionEvent function onTouchEvent(). But the side effect is the size of MathView will become very large. I hope my solution will help you. @HarishEdara @RanaRanvijaySingh @FirdousNath @manassharma07

DrunkenElf commented 5 years ago

To solve it you just need to use your custom webview. Here is what you need to do:

  1. Import Mathview library
  2. Create your own class extending webview and copy MathView class into your. And delete Ontouchevent
  3. copy this text image

And set this to your custom webview image

garayevfarid12 commented 3 years ago

To solve it you just need to use your custom webview. Here is what you need to do:

  1. Import Mathview library
  2. Create your own class extending webview and copy MathView class into your. And delete Ontouchevent
  3. copy this text image

And set this to your custom webview image

Hi, i want to try this but i cannot find the .aar file. The links are not working, can you send me link of the .aar file please? thanks

muankit commented 2 years ago

@FirdousNath

setting config will solve this issue

latexMathView.config(
                "MathJax.Hub.Config({\n"+
                        "  CommonHTML: { linebreaks: { automatic: true } },\n"+
                        "  \"HTML-CSS\": { linebreaks: { automatic: true } },\n"+
                        "         SVG: { linebreaks: { automatic: true } }\n"+
                        "});");