Rss parser android with text on image - android

I was thinking of an app that would pars images and text from a rss and that the output will be like this:
http://gromdroid.99k.org/Screenshot_2012-08-11-15-00-07.png
but my question is how i could get the image from rss in a imageview with fill_parent as width and that there would be an textview on the imageview.
Does anybody know how to do this?

Taken from this post
See this custom or dynamic Listview example
also see this to how to load image from URL
This is the most comprehensive RSS reader tutroial I've found as well.

Related

Programmatically add ImageView and text to GridView

I'm display a list of items that has this same format (and I don't know how many of them):
Icon SomeText SomeText SomeText
Icon SomeText SomeText SomeText
...
I am using a GridView to display this so the list is scrollable.
I believe an ArrayAdapter would help me fill in the text fields.
But about the Icon fields, because they are .gif URLs, I am thinking about downloading the images first then put each one in an ImageView but I haven't figured out how do I programmatically do this.
There are libraries for that, most notably Picasso by guys from square, and glide used in samples from Google.
Spend two minutes with google.com and found a tutorial for your https://futurestud.io/blog/picasso-adapter-use-for-listview-gridview-etc/
But then, you are using GIF files, so I guess you should us
Ion
as it supports GIF format.
So replace picasso used in tutorial with Ion and you should have what you want.

Preview image of text file in Android

I would like knowing if it's possible to obtain the preview image (thumbnail) of any text file in Android, like PDF, DOC, TXT, PPT, PPTX, RSS or HTML.
If the response is positive, how do I can make it?
I have the preview images of video and image files, and I want to obtain the same result for text files.
Thanks for your attention, greetings.
This can be quite a problem since you need to handle every file type individually.
TXT, RSS and HTML are simple enough, you can just read them all like a text file and display the text on the screen (first X characters, for instance, either with a TextView or by manually drawing it in the onDraw method. However, if you want to render the HTML, look at this question.
PDF is another story, you need some sort of rendering endine for that, you might want to look at MuPDF.
RSS and HTML Can work the same way as a normal TXT file.
PPT, PPTX and DOC will also need a custom renderer, you might want to look at this question.

How to create custom Layout?

In my apps i want to display images and text in three ways
ListView
GridView
FullScreen
i have 500+ images and text that i parse using JSON and store into SQLite.
I know how to create ListView & GridView but problem is I don't know how to create the custom layout.
I have image but due to my low reputation i am not able to post image.
I try to explain what i need.
I need custom fullscreen layout that has 2 buttons, one on the left and other on the right and between those 2 buttons I need Imageview that display the fullscreen image.
thanks in advance
Use UniversalImageLoader library, as it has all the modes you need. It also supports caching and lazy load, which you will definitely need on 500 images.

Make imageview dynamically load images from latest posts on a website

I have an app and it's main layout has an imageview and a textview. I want the imageview to load whatever image is the thumbnail from the website and the text to load the title of the post on the website. Layout looks like this. Thanks in advance.
I have scoured the internet to no avail, any help is appreciated.
There's nothing 'ready-made' available.
You'll have to:
Find what's the website API (or create one);
make a call to this API to acquire the site data (usually as JSON or XML);
parse that data into meaningful information;
download the image (usually as a Bitmap object);
and set this Bitmap to the ImageView using the method .setImageBitmap(Bitmap);

How to read text and image from html?

How to read all text and images from a html page for example
http://wireless.ign.com/articles/118/1186400p1.html
Lets say i would like to get the text on the page, and the Latest images?
How would i go about doing this?
via HTTPGET Request? If so how?
How can i get this text and then do something with it and the images, like set it to a text view, and set the images to ImageView.
use below code in unix/linux
wget http://wireless.ign.com/articles/118/1186400p1.html -O test.html
Use HttpURLConnection to get the html, and then use Regex or something like JSoup or similar to parse the Html.

Categories

Resources