First thumbnail Image inCustomized ListView is not Visible - android-layout

I am working on Android GingerBread. I'm using the following tutorial:
http://www.androidhive.info/2012/02/android-custom-listview-with-image-and-text/
for the following XML:
http://api.androidhive.info/music/music.xml
The problem is, everything is good except that I'm not getting the image of the first node in my Customized ListView thumbnail.
If someone knows the solution, it would be highly appreciated. I've tried several times cleaning and refreshing the project but no use.

Related

Vaadin - SVG Generator, any alternative?

I have been working with Vaadin charts during this week and I found a problem that I cannot solve. I need to send several charts to a PDF generation (using iTextpdf) and I could do it using SVGGenerator. The main problem is I cannot use this solution because the final laptop doesn't allow any installation, and Phantomjs is required for SVG Generator (no add-on can be installed neither). I tried to find a different solution to convert the chart content into file or buffer that I can manage, but I think I have been reading so much posts and I am not able to distinguish the solution.
So, I will try to clarify basic questions first:
a) Is it possible to manage SVG Generator without any installation in the laptop?
b) If not, is there a different way to convert a chart into an object which class could be managed to insert it into a PDF?
I can assure you I tried to read all documentation in this forum and official Vaadin forum related to this topic but I couldn't find any solution. I don't want to seem lazy, I only want to avoid spending more time and clarify the maining pre-conditions to solve this issue.
thanks in advance for your time and help.
Kind regards,
David.
You can take a screenshot of your chart and append it to pdf:
Screenshot screenshot = new Screenshot();
screenshot.setTargetComponent(myTargetComponent);
myChartLayout.addComponent(screenshot);
//when complete
screenshot.addScreenshotListener(new ScreenshotListener() {
public void screenshotComplete(ScreenshotImage image) {
//do something
}
});
//take screenshot
screenshot.takeScreenshot();
You will not be able to render a Vaadin Chart without a web browser engine of some kind. That's what PhantomJS provides. If you have a full-blown web browser at your disposal, though, you can grab the SVG markup manually from there; it's just a bit more difficult to automate. This works in Chrome:
Open your Charts app in the browser
Open the JavaScript console (Ctrl/Cmd + Shift + J)
Type something like this: copy(document.getElementsByTagName('svg')[0].outerHTML)
Paste the contents of your clipboard to a new text file and save it as an SVG.
You don't need to install phantomjs, just bundle its binary along with your web application (Reference). I did the same thing with my Amazon AWS deployment and it works just fine.

How to save images drawn with drawRect BEFORE VC.m tries to load them?

Thanks for all the help this site has been to help answer many questions!
I overrode drawRect in subclass of UIView, drew a bunch of images and save them as PNGs.
Next I am trying to load the images for use in ViewController.m
Finally got animations working, but experienced a time when VC would try to load the images before Draw2D had saved them. Found that NSLog worked well to see sequence of events:
if ([self loadNamedImage:nameToLoad]) {
[image2set addObject:[self loadNamedImage:nameToLoad]];
NSLog(#"Loaded %#", nameToLoad8); }
loadNamedImage is the method that returns the loaded images. Adding if/exist seemed to fix the problem for awhile, but I want to properly use something like
performSelectorOnMainThread:withObject:waitUntilDone:;
// where to place command, which object, etc?
tried using sleep statement in VC hoping the sleep time would be used to save the images before trying to load them .. how can the program startup sequence be adjusted enough to make this work?
dBC
found that using viewDidAppear vs viewDidLoad solved my problem for awhile.
Recently started working with Gestures and reset simulator setting as suggested to fix finding needed files. Now the images won't load again because viewDidAppear tries to load pics before overridden DrawRect method draws them. Tried different restore points, clean project, and uninstall app from simulator to no avail :o(
Examples of where and how to implement addDependency, GCD or other solution are greatly appreciated!

masonry images loaded not working

Dear community im using the masonry script on this site: http://www.hoeckernetworks.impulsfaktor.abcde.biz/
I was searching for an option to fix the picture loading problem and i found imagesLoaded. I try to get it to work, but it wont do its job. I am not a great javascript programmer and tryed it with the example code. Maybe someone has a hint for me. Just to inform: i use masonry working with html. If its needed i can send my source but i think one can see it on the site.
regards an already thanks for any help

Iphone route-me application issue

I am using route-me MapView for displaying offline map. It works well in the sample. I followed the Embedding guides and added the MapView.XCodeProj to my Xcode project it compiles successfully. But in my viewcontroller if i add RMMapView view as a subview to main view. It gives an error as "RMMapView refrence not found"
Need a bit more information, the exact error output would be helpful, but it sounds like you are missing the libraries. Make sure that libMapView.a has been added to Target->Build Phases->Link Binary With Libraries.
You might want to double check every step of the embedding guides.
Ciao!
-- Randy

Web image display in iPhone app

I am new to developing on the iPhone so am sorry if this is an easy question, but it has had me stumped for a little while.
Basically the app displays data retrieved from an XML feed. In that feed is an element that contains the path to an image. eg http://www.myserver.com/myimage.jpeg.
I want to be able to display that image in the list view of my iPhone app.
Most importantly, I don't want to stop the list drawing for each image, the rest of the data should be displayed immediately and then each image downloads and displays as quickly as data speed etc make it available.
What is the best way of downloading that image and displaying it?
Ideally can someone point to some working example code.
Thanks
Stephen
Displaying the image: you could create a UIWebView and just point it to the path - and then it's fully zoomable too.
Displaying in the list view:
//Somehow download your image...
cell.image = Your Image

Resources