How do I disable the scrollbar in scrollview.I think it might be possible with reflection lib.I tried looking into reflection,but since i am still new in Java,I am not able to get it.Could someone please help me out.:sign0104:
I'm interested in this too. But my knowledge of reflection isn't good enough yet. So if nobody provides an answer maybe I'll have to find it out some day, the hard way.
Hey,
I'm having difficulty getting this code to work. I have the reflector library and have tried different commands in the past that also showed no effect on my program.
There are no compilation or runtime complaints...nothing happens.
I essentially just copied your code into the end of my routine.
B4X:
Sub txtOffsetsCommentBox_Click
If LoadedFile = "" Then
CallPromptBox("You must save your program to write comments. Save now?", False, "ForceSave")
Return
End If
blnSetupInfo = True
SaveNameEdit = False
TypedString = txtOffsetsCommentBox(intOffsetsCommentBox).Text
QWERTYPanelBackground.visible = True
QWERTYPanelBackground.bringtofront
Dim txtinter As EditText
txtinter = Sender
intOffsetsCommentBox = txtinter.Tag
pnlExpandOffsets.Panel.Height = txtOffsetsCommentBox(intOffsetsCommentBox).Top + pnlExpandOffsets.Height
pnlExpandOffsets.Width = Activity.Width - 1
DoEvents
pnlExpandOffsets.Width = Activity.Width
pnlExpandOffsets.ScrollPosition = txtOffsetsCommentBox(intOffsetsCommentBox).Top
Dim StopScroll As Reflector
StopScroll.Target = pnlExpandOffsets
StopScroll.RunMethod2("setVerticalScrollBarEnabled", False, "java.lang.boolean")
End Sub
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
I ran this on my tablet (Toshiba Thrive) and had the same results that I saw when using the reflection code in my main application. However, I then ran this exact same application on a phone and the code worked perfectly.
The tablet is running HoneyComb and the phone is running 2.x. Is there something in the reflection library that doesn't like HoneyComb?