Populate listview with images - Android Software Development

Hello everyone,
Sorry if this has already been answered. I did search but I couldn't find a clear answer(there were some but they weren't exactly what I needed).
What I'm trying to do is just show a bunch of images from the web. I figured getting the images would be the hard part but it turned out to be easy. Now I have an arraylist of imageviews and I figured the easiest way to show them would be in a listview. I made a ListActivity and then used setListAdapter with the arraylist of image views that I have. I ended up with a bunch of things like
[email protected]
for all of my list items. Obviously, this is not what I was hoping for.
Any help here would be greatly appreciated.
Thank you so much,
Samuel Maskell

I meant to say ArrayAdapter, actually. That would make more sense..

maybe I'll explain a bit more what I'm doing.
I'm getting a bitmaps from BitmapFactory.decodeStream()
then creating a BitmapDrawable
and finally using ImageView.setImageDrawable() with that BitmapDrawable
should I be doing something else?

I kind of figured it out using this tutorial
http://www.anddev.org/novice-tutori...t97.html?sid=57c1096099cb666b386eb4ab65aba0c6
It wasn't exactly what I wanted to but I managed to figure it out eventually
however, now my images have a bunch of space between time.. oh well
hopefully I can figure that out

Related

Best way to Modify Today??

First I want to thank everyone for all the help perfecting my new 8125!
I've searched high and low, and I've found tons of threads showing peoples Today screens, I haven't found a good way to create them. I'm looking for something basic that doesn't take up device memory. On my old Mobile3 device, I could edit the file by hand, but haven't found a way to do this yet.
I'm just looking to be able to change colors, get rid of backgrounds, move items around, and maybe change fonts.
Any advice? Is there a thread somewhere that outlines the process that I may have missed?
Thanks again
Sounds like you want to change the theme of your phone, not add new today plug-ins. Try searching for ThemeGenerator or something like that--it might have the settings you're after.

I need some help with c# and visual studio 2005. Specifically writing to text files

Im just making my first program, and throwing myself in teh deep end, with no experience whatsoever. But its great fun [when not frustrating]
Im using c# and VS2005 professional edition, and ive basically created my user interface, with 3 numericupdown boxes, i want to out put those values into a text file for another file to read.
All methods from the internet havent worked, and give random errors, possibly because of my lack of experience, and i have no idea where to put them, but i think ive been doing it right. And i have searched here aswell, but it seems that its more where people post programs rather then beign about development.
If you can help, but need more information please pm me, its just that id rather not share the whole infomation with everyone [not that i dont trust you]
Thanks to you all
Rory
File management is in System.IO. In there, you have the File class.
There are a bunch of HowTo's there. One of them explains how to write to a file.
What errors are you seeing?
thanks so much..
Finally solved my problem, and my msdn library doesnt have that in it.. hmm
Might be back soon with more problems
lol
Thanks
Rory
x

Quick Fix in Eclipse not showing suggestions

Hi all,
I'm VERY new to Android Development and I'm finally at the point where I'm starting to write my first VERY basic app.
I've done a bunch of reading and watched a bunch of tutorials to get to this point.
I'm one of the tutorials I'm watching they show how the 'Quick Fix' in Eclipse can help with things such as suggesting which imports to use and and option to import them.
For instance I'm defining a Button that I put on my main layout and I haven't imported anything... now I know I have to add the button class, but can't figure out how to get the quick fix working so that it shows suggestions.
Right now if I click on the line and hit CTRL+1 (or select it fromt he Edit menu) it just gives 'No suggestions available'.
I've done some searching and haven't found anything to help with this yet.
Thanks for any information!
**** UPdate ****
Ugg, total newbie error.
I was trying to define them outside of the public class, so of course it didn't know what the H*LL I wanted to do. :0
Moved them inside and it pops right up now..

Looking for an PHp and XML xpath geek...

I am looking for some help anyone that is familiar with php and xpath please email me, I have a couple of questions.
I am trying to complete a web based app for WINMO
Metaplane
dhpcnc at gmail
Here is my problem
Here is part of the xml file.
-
<forecast_conditions>
<day_of_week data="Fri"/>
<low data="59"/>
<high data="89"/>
<icon data="/ig/images/weather/sunny.gif"/>
<condition data="Sunny"/>
</forecast_conditions>
-
<forecast_conditions>
<day_of_week data="Sat"/>
<low data="47"/>
<high data="71"/>
<icon data="/ig/images/weather/sunny.gif"/>
<condition data="Sunny"/>
</forecast_conditions>
I want to only display the /condition (<condition data="Sunny"/>) for a given day, such as /forecast_conditions/day_of_week[data="Fri"], what would the proper xpath statement be for that?
I know this is the apps thread, but all you super geeks hang out here and I know several of you guys are xml experts, LOL. Yes, I'm still learning but hey at least I know when to throw up my hands and ask for help.
Come on...
I can't believe out of 49 views that no one knows how to do this, LOL. Or maybe its just that no one wants to take the time, but thanks anyhow.
If you want just the data attribute from the condition element the proper xpath statement would be:
/forecast_conditions[day_of_week/@data="Sat"]/condition/@data
or drop the /@data at the end if you want the whole element.
I did not test this so I'm not making any guarantees. Try it out.
Thanks MooGoo
/forecast_conditions[day_of_week/@data="Sat"] worked

[Q] Moving images

I've been looking for threads talking about what I need, but to no avail. So if I should be looking somewhere specific please point me in the correct direction. I've been trying to get an image to move from A to B. I just need an idea of how to do this. Like am I able to use images from drawable, put it over an image button, and then move it over the location of another image button? Any suggestions or help are greatly appreciated. Also, I'm using a linear layout and have looked through the android dev pages but didn't find what I needed(or at least I don't know how to use what I've found for what I'm trying to do)
I dont really know what you're talking about with the whole imageview thing... but if you want to move an object from A to B, id suggest looking at the Animation class

Categories

Resources