Informatx, touch the help & about item for about 1 second. What happens then?
Henk
What does say your log when the app crashes ?
java.lang.RuntimeException: MotionEvent { action=ACTION_UP, id[0]=0, x[0]=75.90512, y[0]=291.39294, toolType[0]=TOOL_TYPE_FINGER, buttonState=0, metaState=0, flags=0x0, edgeFlags=0x0, pointerCount=1, historySize=0, eventTime=8462230, downTime=8460963, deviceId=2, source=0x1002 } recycled twice!
at android.view.MotionEvent.recycle(MotionEvent.java:1660)
at android.view.ViewRootImpl.finishMotionEvent(ViewRootImpl.java:2942)
at android.view.ViewRootImpl.deliverPointerEvent(ViewRootImpl.java:2933)
at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2492)
at android.view.ViewRootImpl.processInputEvents(ViewRootImpl.java:870)
at android.view.ViewRootImpl.handleMessage(ViewRootImpl.java:2501)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4424)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
at dalvik.system.NativeStart.main(Native Method)
Private Sub mListView_ItemClick (Position As Int, Value As Object)
Dim subname As String
Hide
subname = mEventName & "_Click"
If SubExists(mModule, subname) Then
'CallSub2(mModule, subname, Value)
CallSubDelayed2(mModule, subname, Value)
End If
End Sub
mSlidePanel.Height = mListView.Size * itemHeight - 2
If (mSlidePanel.Height > 100%y - mSlidePanel.Top) Then mSlidePanel.Height = 100%y - mSlidePanel.Top
mListView.Height = mSlidePanel.Height
Dim c As Canvas
c.Initialize(mListView)
Dim w As Int = c.MeasureStringWidth(Text,mListView.TwoLinesAndBitmap.Label.Typeface,mListView.TwoLinesAndBitmap.Label.TextSize) + mListView.TwoLinesAndBitmap.ImageView.Width
Log ("w=" & w)
If (w > mSlidePanel.Width ) Then ' if smaller no need to change, leave the width as the wider of all labels
mSlidePanel.Width = w
mListView.Width = w
End If
Public Sub AddItem(Text As String, Image As Bitmap, ReturnValue As Object)
Dim item As ActionItem
item.Initialize
item.Text = Text
item.Image = Image
item.Value = ReturnValue
If Not(Image.IsInitialized) Then
mListView.AddTwoLinesAndBitmap2(Text, "", Null, ReturnValue)
Else
mListView.AddTwoLinesAndBitmap2(Text, "", Image, ReturnValue)
End If
'Log (mListView.Size & " items Hight:" & (mListView.Size * itemHeight))
'mSlidePanel.Height = mListView.Size * itemHeight - 2
'If (mSlidePanel.Height > 100%y - mSlidePanel.Top) Then mSlidePanel.Height = 100%y - mSlidePanel.Top
mSlidePanel.Height = mListView.Size * itemHeight - 2
If (mSlidePanel.Height > 100%y) Then mSlidePanel.Height = 100%y
mSlidePanel.Top = 100%y-mSlidePanel.Height ' set to grow from the bottom
mListView.Height = mSlidePanel.Height
'log ("width=" & mlistView.Width)
Dim c As Canvas
c.Initialize(mListView)
Dim w As Int = c.MeasureStringWidth(Text,mListView.TwoLinesAndBitmap.Label.Typeface,mListView.TwoLinesAndBitmap.Label.TextSize) + mListView.TwoLinesAndBitmap.Label.Left+ 10
'Log ("w=" & w)
If (w>100%x) Then w = 100%x
If (w > mSlidePanel.Width ) Then ' if smaller no need to change, leave the width as the wider of all labels
'Log ("setting width to be:" & w)
mSlidePanel.Width = w
mListView.Width = w
End If
End Sub
The list is done with a standard ListView object which does not have the possibility to change the color (It should be the system default color for selected list items). If you want to change the color you will have to modify the class and use something like a scrollview or the mListView library or UltimateListView (not free) for this.
You have to add it to all your activities.
Sub SlideMenu_Click(Item As Object)
Dim ix As Int
ix=Item
Select Case ix
Case 1
'profile
StartActivity(ProfileForm)
Case 2
'new
StartActivity(NewArticle)
Case 3
'search
Case 4
'Category
Case 5
'About
StartActivity(AboutUs)
Case 6
'logout
StartActivity(LoginForm)
Activity.Finish
End Select
End Sub
LogCat connected to: B4A-Bridge: Hisense AD683G-a1000033e86438
--------- beginning of /dev/log/system
--------- beginning of /dev/log/main
Installing file.
PackageAdded: package:rony.cerita.seru
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
startService: class anywheresoftware.b4a.samples.httputils2.httputils2service
** Service (httputils2service) Create **
** Service (httputils2service) Start **
** Activity (main) Pause, UserClosed = true **
** Activity (menuutama) Create, isFirst = true **
** Activity (menuutama) Resume **
** Activity (menuutama) Pause, UserClosed = false **
** Activity (profileform) Create, isFirst = true **
** Activity (profileform) Resume **
** Activity (profileform) Pause, UserClosed = true **
** Activity (menuutama) Resume **
** Activity (menuutama) Pause, UserClosed = false **
** Activity (menuutama) Resume **
** Activity (menuutama) Pause, UserClosed = false **
Private Sub mListView_ItemClick (Position As Int, Value As Object)
Dim subname As String
Hide
subname = mEventName & "_Click"
If SubExists(mModule, subname) Then
'CallSub2(mModule, subname, Value)
CallSubDelayed2(mModule, subname, Value)
End If
End Sub
If SubExists(Main, subname) Then
''CallSub2(Main, subname, Value)
CallSubDelayed2(Main, subname, Value)
End If