E ermiakhan Member Apr 3, 2020 #1 Hi, I am trying to show text of book on a justified format on app there was a way to use canvas and it needs to process the text and takes time now i want to use justifyTextView it's perfect for justify but i don't know how i can put text lines equal to height of text view because i dont think heigh measuring of canvas work because it returns height of a single line and there is no way to find out how much of text is on each line Last edited: Apr 3, 2020
Hi, I am trying to show text of book on a justified format on app there was a way to use canvas and it needs to process the text and takes time now i want to use justifyTextView it's perfect for justify but i don't know how i can put text lines equal to height of text view because i dont think heigh measuring of canvas work because it returns height of a single line and there is no way to find out how much of text is on each line
E ermiakhan Member Apr 3, 2020 #2 someone says use this for scroll the textview #if java import android.widget.TextView; import android.text.method.ScrollingMovementMethod; public void zxc (TextView x) {x.setMovementMethod(new ScrollingMovementMethod());} #end if Dim jo As JavaObject jo.InitializeContext.RunMethod("zxc",Array As Object(Label1)) it works but size is incorrect and half of scrolling justifyTextView is empty not good for an user friendly app Upvote 0
someone says use this for scroll the textview #if java import android.widget.TextView; import android.text.method.ScrollingMovementMethod; public void zxc (TextView x) {x.setMovementMethod(new ScrollingMovementMethod());} #end if Dim jo As JavaObject jo.InitializeContext.RunMethod("zxc",Array As Object(Label1)) it works but size is incorrect and half of scrolling justifyTextView is empty not good for an user friendly app
E ermiakhan Member Apr 3, 2020 #3 and StrUtil.MeasureMultilineTextHeight not works on justifyTextView because there is no width property . . . . the crazy way using a bitmap font drawing on a bitmap and put on a surface it should work Upvote 0
and StrUtil.MeasureMultilineTextHeight not works on justifyTextView because there is no width property . . . . the crazy way using a bitmap font drawing on a bitmap and put on a surface it should work
Toky Olivier Active Member Licensed User Longtime User Apr 4, 2020 #4 Use BBCodeView: https://www.b4x.com/android/forum/t...t-engine-bbcode-parser-rich-text-view.106207/ You can measure content height as you see in the function made by Erel: https://www.b4x.com/android/forum/t...tically-text-in-bbcodeview.113470/post-708069 Upvote 0
Use BBCodeView: https://www.b4x.com/android/forum/t...t-engine-bbcode-parser-rich-text-view.106207/ You can measure content height as you see in the function made by Erel: https://www.b4x.com/android/forum/t...tically-text-in-bbcodeview.113470/post-708069
Toky Olivier Active Member Licensed User Longtime User Apr 4, 2020 #5 Another option (may be simplier) is to use: StringUtils.MeasureMultilineTextHeight Upvote 0
E ermiakhan Member Apr 4, 2020 #6 Toky Olivier said: Another option (may be simplier) is to use: StringUtils.MeasureMultilineTextHeight Click to expand... not working with justifyTextView Upvote 0
Toky Olivier said: Another option (may be simplier) is to use: StringUtils.MeasureMultilineTextHeight Click to expand... not working with justifyTextView