list

  1. KMatle

    B4J Tutorial [B4x] Exchange Data via OkHttpUtils and php (or other platforms) via lists, maps, arrays, etc.

    I made 7 examples how to exchange data between B4x apps and php. I use the POSTSTRING method as it is simple, secure (get-methods will be logged with the data autmatically on the server, post-methods not), strings can be formatted very easy (JSON) and en-/decrypted (not included but see my other...
  2. OliverA

    B4J Question For Each/Next List of Maps and references. What am I misunderstanding?

    B4J Version: 7.51 OS Platfrom: Win10 Pro (1903) JDK: 11.0.1 downloaded from B4X's site Here's the setup. I'm creating a list of maps that contain x, y values (note: in my case, the map contains way more info, I'm just simplifying it here to show the issue I'm running into) Dim largestX As...
  3. jimich

    B4J Question b4j kvs2 multi-column csv

    Good day to all, I have code below. Everything is ok except when using kvs.get(), which I could not get every item on the list. Thank you for your kind reply. 'Non-UI application (console / server application) #Region Project Attributes #CommandLineArgs: #MergeLibraries: True...
  4. Mashiane

    B4J Question How to get all enclosed strings with #?

    Hi there Let's assume, this is the master content.. Today #I# got to #experiment# #with# reef. I #needed# this to try #and# see if #I# can #wrap# it with #BANano#.png Now I need to return a list that will have I,experiment,with,needed,and,wrap,BANano And kindly need a code snippet for such...
  5. TelKel81

    Android Question Is there a way to create/return an explicit cast of a List/Map.

    Ex: Dim myLife as Map (As yearstring, As Wine) If myLife.Get("2019").IsTonsOfWine = True Then... Because I haven't found any with the IDE or in the forums. That would be a huuuuuuuuuuuuuuuuuuuuuuuge time saver I believe. Thanks !
  6. Mashiane

    B4J Question How to Unflatten List to a JSON Tree?

    Hi there Can anyone please help with a snippet to unflatten data into a json stree? For example, this is my list of records... Dim arr As List arr.Initialize arr.Add(CreateMap("id":1 ,"parentid" : 0)) arr.Add(CreateMap("id":4 ,"parentid" : 2)) arr.Add(CreateMap("id":3 ,"parentid" : 1))...
  7. MarkusR

    B4J Question List into hierarchy List

    hello, i need an idea. i have a item with property "A" and "B" A is parent from B or B is child from A from this items i have a list (it describes a status workflow from to) and i need to bring them to a hierarchy view but i don't know which is the root. X,Z A,B D,G Z,A B,D Output should...
  8. makis_best

    Android Question [SOLVED] Insert type into list

    Hi I am confused about how to insert a type into a list So far I have.... Sub Process_Globals Thelist As List TheList.initialize Type TheRT(Code As String, Description As String, Price As Double, Quantity As Double) Public ItemInfo As TheRT End Sub Sub...
  9. S

    B4A Class Get value from complex structure (combination of map, list, array)

    Hello, This is a module code to retrieve value from complex structure (combination of list, map, array and primitives types). Give the path with a dot (.) separator to get the value or the default value if not accessible. example : m=createmap("Name":"John" ,"Friends":array as...
  10. RobyLaga

    Android Question LIST Print

    Buongiorno, premetto ... che sono un "praticone", comunque vorrei sapere se è possibile inviare per Whatsapp una LIST ("filtrata") che genero in un modulo. dal Google traslator :-) practice = hobby pratico = passatempo Grazie
  11. A

    Android Question Item exist in list (by index)

    Hello, Does anybody know if there is a way to check if an item exists in a list, finding by index? for example: If list1.isexist(8) Then ...... End if Thanks in advance
  12. K

    Android Question list.size slowing down app

    I have json file which contain nearly 37000 record when I'm using : Dim list1 As List list1 = json.NextArray Dim exact_record As Int exact_record = list1.Size It slow down app. this work fine : Dim exact_record As Int exact_record = 38000 what i'm doing wrong?
  13. Myr0n

    Android Code Snippet Get Random Numbers in a non repeating list

    The next code snippet, return a list with non repeating random numbers Feel free to modify or use it as you want. This code depends on JavaObject and Inline Java Code usage. I decide to use the inline java because the Core random function (RND) get stuck at some point, I do not have the Core...
  14. nibbo

    Android Question List key sequence

    Hi All I use a webservice to return JSON data which looks something like: Data:[{"col1":"value1","col2":"value2","col3":"value3","col4","value4"}{…etc...}] I store save the above to the list: dim recordList = root.Get("Data") I then iterate through the list using: For i = 0 To recordList.Size...
  15. Mashiane

    B4J Question TableView: To 'Object' or To 'List' - that is the question

    Hi there I have been using the 'Dim row(3) As Object' notation for a while with tableviews record addition. So I decided to try to use a list instead. So I.. Dim row as List row.Initialize row.add("x") row.add("y") row.add("z") tableview.items.add(row) of rather row.AddAll(array as...
  16. K

    Android Question http getstring in autocomplete setitems

    I got http.getstring == [{"place_return":",'','a place','b place','c place'"}] like this and i have to insert it into autocomplete.setitem() I tried like this :: Dim p As JSONParser p.Initialize(Job.GetString) Dim list1 As List list1 =...
  17. analizer3816

    Android Question cannot get data in List & Map from java library

    I can't get size or data in list and map from java lib [I need java lib + b4a and use list in map , map in map, map in list or list in list] please suggest me for fixed this problem thanks this is my test lib java library code: ackage testlib; import anywheresoftware.b4a.BA; import...
  18. LucaMs

    B4A Class [B4X] List2

    Description: A simple class to add 3 methods to the native List. Methods: IndexOf2(Item As Object, StartIndex As Int) As Int Returns the index of the specified item starting the search from StartIndex. Returns -1 if Item was not found. GetAllIndexes(Item As Object) As List Returns a list...
  19. FERNANDO SILVEIRA

    Android Question Problem using list / map

    Hello guys, I've seen this issue in many other threads here, but now that I need it I'm unable to find the answer. I cast labels on the activity and want to save their information for later retrieval (.text, .left, .top, etc). I created a map with the fields I want to save. I lstLetters.add...
  20. FERNANDO SILVEIRA

    Android Question LIST2 = SHUFFELIST(LIST1) also changes LIST1, Why?

    Hello Guys, I have the following code to shuffle LIST1 into LIST2, but at the end both lists are shuffled. I want LIST1 as it was originally. What am I doing wrong? Dim lstWords1, lstWords2 As List lstWords1 = Array("AVIÃO", "BOLA", "CASA", "COPO", "DADO", "FACA", "FLOR", "FOGO"...
Top