Reflection Library not working on tablet.

Mickster

Active Member
Licensed User
Longtime User
Hey,

My program requires functions built into the reflection library, however I noticed that none of these functions seemed to work on the tablet I'm developing with (Toshiba Thrive 3.x).

At first I was trying to recycle bitmaps and found that nothing was working. At the time I couldn't decide whether it wasn't working or it wasn't working well enough. But now I've tried using the reflection library to disable the scroll in a scrollview and found that it has no effect.

I knocked together this quick program to test the reflection library on different devices:
B4X:
Sub Activity_Create(FirstTime As Boolean)

    Dim Scroll As ScrollView
    Scroll.Initialize(Activity.Height + 800)
    Scroll.Panel.Color = Colors.White
    Activity.AddView(Scroll, 0, 0, 100%x, 100%y)
    Dim Stop As Reflector
    Stop.Target = Scroll
    Stop.RunMethod2("setVerticalScrollBarEnabled", False, "java.lang.boolean")
    

End Sub

This code had no effect on my tablet, however it successfully disabled the scroll on a 2.x phone that I tested.

Anyone have any ideas why nothing is working on the tablet?
 

agraham

Expert
Licensed User
Longtime User
The documentation for setVerticalScrollBarEnabled is
Define whether the vertical scrollbar should be drawn or not.
On my Xoom (4.0.4) it does exactly what it says on the tin. It only controls whether the scroll bar is visible but does not disable scrolling. From googling this appears to be the expected behaviour. I have no idea why it disables scrolling on your 2.2 device. Maybe it was unintended behaviour that got fixed in later versions.
 
Last edited:
Upvote 0

Mickster

Active Member
Licensed User
Longtime User
Oh, well that's a pretty unhappy coincidence.

I was hoping that the tablet was having issues mainly because bitmap recycle isn't doing enough for my program (it's REALLY bitmap intensive).

Well, thanks for clearing that up.

:sign0148:
 
Upvote 0
Top