Sub Button1_Click
CustomListView1.Clear
For Each KEY As Int In m.Keys
CustomListView1.Add(CreateItem1(KEY), KEY)
Next
End Sub
Private Sub CustomListView1_ItemClick (Index As Int, Value As Object)
Dim ItemList As List = m.Get(Value)
CustomListView2.Clear
For Each item As String In ItemList
CustomListView2.AddTextItem(item, "")
Next
End Sub
Starting from zero it can be harder in some ways because you have to discover everything, and it can be easier by other meaning because you have no other knowledge to overcome.I want to learn B4x, but there are no guides or tutorials for beginners to learn this ..
You cannot use File.ReadMap and File.WriteMap because your values are lists not strings. You have to use Serializator (need RandomAccessFile lib) to save the file and retrieve it.. See below code:In this case there is a string not a list!!!!
' Write map to file
Dim ser As B4XSerializator 'you need RandomAccessFile lbrary checked
Dim typebytes() As Byte = ser.ConvertObjectToBytes(m)
File.WriteBytes(File.DirInternal,"test.obj",typebytes) 'or what ever directory you are using to store the file
' Read map from file
Dim bytesread() As Byte = File.ReadBytes(File.DirInternal,"test.obj")
m = ser.ConvertBytesToObject(bytesread)
Error occurred on line: 43 (aaa)
java.lang.RuntimeException: Method: getSize not found in: java.lang.String
at anywheresoftware.b4a.shell.Shell$MethodCache.getMethod(Shell.java:985)
at anywheresoftware.b4a.shell.Shell.getMethod(Shell.java:644)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:731)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:348)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at b4a.example.aaa.afterFirstLayout(aaa.java:105)
at b4a.example.aaa.access$000(aaa.java:17)
at b4a.example.aaa$WaitForLayout.run(aaa.java:83)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:214)
at android.app.ActivityThread.main(ActivityThread.java:7050)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:494)
https://www.b4x.com/etp.html?vimeography_gallery=1&vimeography_video=440642051Dear @Erel I wasting my time with activities because the tutorials are done with them
Valid point. We are in a transition period.Dear @Erel I wasting my time with activities because the tutorials are done with them
@MroBurkthanks @Sagenut, this is what I want to do
Just yesterday I was thinking of creating video tutorials, especially in Italian, before checking if those published by Erel were only on Vimeo and not on YouTube.Valid point. We are in a transition period.
https://www.b4x.com/android/forum/threads/b4xpages-video-tutorials.138811/post-878845Just yesterday I was thinking of creating video tutorials, especially in Italian, before checking if those published by Erel were only on Vimeo and not on YouTube.
Having seen that they are also on YouTube, I gave up, as on this platform it is possible to activate subtitles in any language generated automatically (however imperfect, they will certainly be sufficient to understand everything).
If that unique Erel's video tutorial about B4XPages wasn't enough, I could do others. It all depends on the likes that this post will receive (and a little also on any donations ?).
My fault.@MroBurk
Your original project you posted in post #1 was dealing with map holding 3 lists and in post #9, the project is totally different as it deals with all strings in the map. You really shouldn't make a 180 degree turn and switch topics in the middle of a thread because it makes it hard to help you. The same thing for saving and reading maps which you were at some point interested in. The project in post 9 did not address that topic.
Actually it is a good project and addresses some good points. It should not be removed. It was just a deviation from the original thread content which can have a tendency to render some of the posts irrelevantI will remove my post if it can be considered source of misunderstanding.