B4A Library CustomRSSView

This library will allow you to display RSS feeds "Magazine Style" on a nice custom view.

Requirements:

- B4A 3.8

- Internet connection

How to install:

- Copy the CustomRSSView.jar and CustomRSSView.xml to your additional libraries directory.

Usage:

B4X:
Private rssView As CustomRSSView

'Initialize the CustomRSSView
rssView.Initialize(Activity, Me, "rssView", 50dip, 100%y - 50dip)

'Enter the URL of the RSS feed you want to parse
rssView.ParseRSS("http://www.b4x.com/android/forum/forums/-/index.rss")

If you want to parse local feeds, do this:
B4X:
rssView.ParseOfflineRSS(File.DirAssets, "MagazineStyleTemplate.xml")

That's it!


Notes:

1- This library process only valid XML feeds and extracts the following fields: Title, Author, Description, Link, Image and PubDate.

2- If you want to parse XML feeds which might not be compliant or you want to extract other fields you will have to do it yourself and add the data to the view, there's a method to do that.

3- On some Android versions the images might not show. - Fixed.

4- Included a simple XML template to create a magazine style feed.


Check the attached sample for more details.


Screenshots:


zAaTzPXl.png



BlxFkdVl.jpg



mCcbp2ll.jpg
 

Attachments

  • CustomRSSView_Sample.zip
    12.3 KB · Views: 684
  • CustomRSSView_Lib_1.4.zip
    14.3 KB · Views: 670
Last edited:

ielliot

Member
Licensed User
Longtime User
rssView.PublishedPrompt("xxxxxxx")

Error description: Property: _publishedprompt is writeonly.

What is the correct method for changing this parameter... Thanks
 

ielliot

Member
Licensed User
Longtime User
Hello... is there any way to attach the RSSview to a panel. For example I want to be able to move the position of the RSSView.
 

ielliot

Member
Licensed User
Longtime User
Suggestion:

It would useful to those using the custom Rssview for news to have a header and footer on the feed which can hold a logo with issue information.

Elliot
 

NJDude

Expert
Licensed User
Longtime User
Hello !
can this lib be modified to display html in place of image like
B4X:
rssView.AddToRSSView (Title  As  String ,Author As String, View As WebView , PubDate As String, Link As String)
i want ti display some html and rich string in place of image.
regards
sanjib
You can leave the image blank and add the HTML text to the Description field
 

NJDude

Expert
Licensed User
Longtime User
How I can set the "TitleTextColor" and "TitleBackgroungColor"?

Thanks.
The intellisense shows the syntax:
B4X:
Sub TitleTextColor(Red As Int, Green As Int, Blue As Int)
For example, if you want the text to be RED then you do:
B4X:
TitleTextColor(255, 0, 0)
TitleBackgroundColor is similar, but it has an additional parameter for Alpha.
 

asales

Expert
Licensed User
Longtime User
The intellisense shows the syntax:
B4X:
Sub TitleTextColor(Red As Int, Green As Int, Blue As Int)
For example, if you want the text to be RED then you do:
B4X:
TitleTextColor(255, 0, 0)
TitleBackgroundColor is similar, but it has an additional parameter for Alpha.

Thanks NJDude!
 

asales

Expert
Licensed User
Longtime User
I try to add the rssView in a panel (+ ActionBar panel) but the bottom of rssView is cut off.
Please see the sample and image in attached.
How I can fix it?
I could not find where the problem is.
Thanks in advance.
 

Attachments

  • RSSView_ActionBar.zip
    12.5 KB · Views: 255
  • SC20140929-222030.png
    SC20140929-222030.png
    39.7 KB · Views: 282

Douglas Farias

Expert
Licensed User
Longtime User
@NJDude
hi man, i m using your lib, works very fine, but i have one problem
how can i open spolier?
when i click in one spolier no hapans nothing *-*
dont work *-*

its possible add click at spolier and open this spolier when is clicked?
 

asales

Expert
Licensed User
Longtime User
@NJDude
hi man, i m using your lib, works very fine, but i have one problem
how can i open spolier?
when i click in one spolier no hapans nothing *-*
dont work *-*

its possible add click at spolier and open this spolier when is clicked?

Hi Douglas.
Did you see my question above?
You succeeded to use the CustomRSS in a panel without cut off the bottom?
What is "spolier"?
 

Douglas Farias

Expert
Licensed User
Longtime User
hi man, i m using at activity and is 100% y and x

spolier = SPOILER* is this
ssssssssssss
 

asales

Expert
Licensed User
Longtime User
spolier = SPOILER* is this
ssssssssssss

See my sample in attached.
Spoiler works, but I can't solved the problem with add CustomRSS to panel and cut off the bottom.
 

Attachments

  • RSSView_SpoilerYES_ActionBarNO.zip
    12.8 KB · Views: 257

Douglas Farias

Expert
Licensed User
Longtime User
See my sample in attached.
Spoiler works, but I can't solved the problem with add CustomRSS to panel and cut off the bottom.

your layout is not correct
here is, panel - pnlaction.height
 

Attachments

  • RSSView_Sample.zip
    377.8 KB · Views: 257
Top