CustomListView - A flexible list based on ScrollView

Status
Not open for further replies.

davelew1s

Active Member
Licensed User
Longtime User
Get text

I am using this customlistview with some alterations it does almost everything I want....but one problem I can't solve is How to get the the text from all the lbl's so I can save it as a csv. I initially load a csv file but need to save it after user input,I've read all the posts in this thread but none help.
Any suggestions? Thanks Dave.
 

GMan

Well-Known Member
Licensed User
Longtime User
Didn't the map-function work ?

B4X:
sets.clear
sets.Put("TextinderMap", lbl1.Text)
File.WriteMap(Dir.Internal, "labels.map", sets)
 

gehrlekrona

Member
Licensed User
Longtime User
Where is the library?

I wish people would include the library in the examples. Where can I find the CustomListView? I am a registered member so you can message me.
 

frapel

Active Member
Licensed User
Longtime User
I wish people would include the library in the examples. Where can I find the CustomListView? I am a registered member so you can message me.

CustomListView is not a library, it's a custom class.
 

IanMc

Well-Known Member
Licensed User
Longtime User
Cool Sig

@frapel

Now that's what I call a signature! :)
Very nice!
:wav:
 

Dave O

Well-Known Member
Licensed User
Longtime User
This would be a great example class to turn into B4A's new "custom view".
 

GMan

Well-Known Member
Licensed User
Longtime User
When i place a CustomView on an activity the TYPE-Field is disabled, so i cant change it to CustomListView ?
 

GMan

Well-Known Member
Licensed User
Longtime User
Yes, and it shows in the top the correct version 1.1

I tried restarting B4A 2.71, but nothing changed...
 

GMan

Well-Known Member
Licensed User
Longtime User
I have a blank activity and placed a CustomView on it - as written, the TYPE-part is still disabled.
 

GMan

Well-Known Member
Licensed User
Longtime User
Hoi Erel,

yes, it works - also the CustomListView.

Reason why not working: i tried to choose the "wrong" TYPE-part in the part above.
As is saw laaaaater the CUSTOMTYPE-part should be selected and changed :sign0089:
 

holdemadvantage

Active Member
Licensed User
Longtime User
I i would like to ask how can i make background transparent of the non-populated customlistview list because i would like to show activity color or image background instead of gray , Thanks in advance
 

Attachments

  • custom.jpg
    custom.jpg
    9.5 KB · Views: 400

shashkiranr

Active Member
Licensed User
Longtime User
Hi Erel,

I have added the custom list view from the designer.

Initially i am checking whether the checkbox is checked and if it true i am setting the checkbox.checked = true. After this it is calling the

Sub chk_CheckedChange(Checked As Boolean) and getting the below error - Null Pointer Exception. :(

Kindly let me know your Inputs.

B4X:
loadlanguagelistview_chk_checkedchange (B4A line: 105)

index = clv1.GetItemFromView(Sender)
java.lang.NullPointerException
    at anywheresoftware.b4a.agraham.reflection.Reflection.runmethod(Reflection.java:205)
    at anywheresoftware.b4a.agraham.reflection.Reflection.RunMethod(Reflection.java:802)
    at anywheresoftware.b4a.samples.customlistview.customlistview._getitemfromview(customlistview.java:150)
    at com.bayalu.mankutimma.loadlanguagelistview._chk_checkedchange(loadlanguagelistview.java:348)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:511)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:169)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:157)
    at anywheresoftware.b4a.objects.CompoundButtonWrapper$1.onCheckedChanged(CompoundButtonWrapper.java:43)
    at android.widget.CompoundButton.setChecked(CompoundButton.java:137)
    at anywheresoftware.b4a.objects.CompoundButtonWrapper.setChecked(CompoundButtonWrapper.java:53)
    at com.bayalu.mankutimma.loadlanguagelistview._createlistitem(loadlanguagelistview.java:464)
    at com.bayalu.mankutimma.loadlanguagelistview._createlanguagelist(loadlanguagelistview.java:396)
    at com.bayalu.mankutimma.loadlanguagelistview._loadlistview(loadlanguagelistview.java:595)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:511)
    at anywheresoftware.b4a.BA.raiseEvent2(BA.java:169)
    at anywheresoftware.b4a.keywords.Common$4.run(Common.java:930)
    at android.os.Handler.handleCallback(Handler.java:615)
    at android.os.Handler.dispatchMessage(Handler.java:92)
    at android.os.Looper.loop(Looper.java:137)
    at android.app.ActivityThread.main(ActivityThread.java:4898)
    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:1008)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:775)
    at dalvik.system.NativeStart.main(Native Method)

Note : Before i was not bothered about the checkbox status and it was working fine.

Regards,
SK
 
Status
Not open for further replies.
Top