Android Example [B4X] RSS Viewer using xCustomListView

After having used the RSS Viewer library in the past, and now finding that it won't function with my secure sites, I decided to start with Erel's XUI CustomListView example and then integrate that with using the XML2MAP library to write a RSS viewer. The attached example is for B4A, but it would probably be easy enough to adapt to b4i as well.

One thing that I do that the RSS viewer library did not do, is dynamically adjust the card size based on the amount of text content. This example also has a browser activity that will load the website URL and allow the user to share the link.

Edit: Updated on 2/19/2019 for better handling of panel resizing.

upload_2019-2-13_16-1-27.png
 

Attachments

  • RSS Example.zip
    20.7 KB · Views: 457
Last edited:

Metalika

Member
hi @Jack Cole i use b4a v 9.8 .
i want to use this source but i cant find lable extras lib
this lib is a internal lib and i think that remove from internal lib in new version b4a!
 

jchal

Active Member
Licensed User
unfortunately i tried to run the code but i got the following error
Logger connected to: Xiaomi Redmi Note 5A Prime
--------- beginning of main
Copying updated assets files (17)
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
*** Service (httputils2service) Create ***
** Service (httputils2service) Start **
Error occurred on line: 24 (Xml2Map)
org.apache.harmony.xml.ExpatParser$ParseException: At line 2, column 0: XML or text declaration not at start of entity
at org.apache.harmony.xml.ExpatParser.parseFragment(ExpatParser.java:515)
at org.apache.harmony.xml.ExpatParser.parseDocument(ExpatParser.java:474)
at org.apache.harmony.xml.ExpatReader.parse(ExpatReader.java:316)
at org.apache.harmony.xml.ExpatReader.parse(ExpatReader.java:279)
at anywheresoftware.b4a.objects.SaxParser.parse(SaxParser.java:80)
at anywheresoftware.b4a.objects.SaxParser.Parse(SaxParser.java:73)
at b4a.example.xml2map._parse2(xml2map.java:259)
at b4a.example.xml2map._parse(xml2map.java:94)
at b4a.example.main._parserssandloadtocustomlistview(main.java:751)
at b4a.example.main$ResumableSub_FillList.resume(main.java:512)
at anywheresoftware.b4a.shell.DebugResumableSub$DelegatableResumableSub.resumeAsUserSub(DebugResumableSub.java:48)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351)
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 anywheresoftware.b4a.BA.raiseEvent(BA.java:193)
at anywheresoftware.b4a.shell.DebugResumableSub$DelegatableResumableSub.resume(DebugResumableSub.java:43)
at anywheresoftware.b4a.BA.checkAndRunWaitForEvent(BA.java:267)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:137)
at anywheresoftware.b4a.BA$2.run(BA.java:387)
at android.os.Handler.handleCallback(Handler.java:754)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:163)
at android.app.ActivityThread.main(ActivityThread.java:6393)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:933)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:823)
 
Top