• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Scroll pictures horizontally - how to?

ac4android

Well-Known Member
Hi.

I'd like to scroll horizontally pictures of a dozen pizzas and pasta on menu

Can you please point me in the right direction.
 
Yes and thx, that's in the direction I am heading.

If I have 30-40 images, is it the best thing to put them inside drawables though? But then, where else could I put them where they will have minimal impact on client Android?

And what if I have new images? Should I to put them in database for download to SQLite?
 
Well if you want to put them in a scrolling list then I think you will have to hold the images in memory as drawables. How big are they?
 
How do I create a folder under res/layout or res/mipmap to hold .png-images for a horizontally scrollable images? Must be do-able, I see a lot of that on twitter.com

I've tried under drawable, mipmap and layout. None would accept a sub-dir. I need to have something like the ic_launcher to launch a series of images

Also, I need to have a "<" and ">" to left and right to he;p user scroll the images.

UPDATE:
Yes, I can create the sub-folder under Project instead of Android.
But how do I load several images into the subfolder? The Android method allows for one and only one image:
Code:
imageView.setImageBitmap(BitmapFactory.decodeResource(getResources(), R.drawable.ic_launcher));
In the above example, Android when and launched the images in ic_launcher, each in a different subdir and each with a different resolution, one after the other

I just want to create a sub-dir with a list of .png images that I can display and scroll, this is an example:

UPDATE: Thanks. Got it working :)
 

Attachments

  • dirStructure.JPG
    dirStructure.JPG
    15.7 KB · Views: 117
Last edited:
Back
Top Bottom