1. Are you ready for the Galaxy S20? Here is everything we know so far!

Scroll pictures horizontally - how to?

Discussion in 'Android Development' started by ac4android, Mar 23, 2016.

  1. ac4android

    ac4android Well-Known Member
    Thread Starter


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

    Can you please point me in the right direction.

  2. Deleted User

    Deleted User Guest

  3. ac4android

    ac4android Well-Known Member
    Thread Starter

    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?
  4. Deleted User

    Deleted User Guest

    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?
  5. ac4android

    ac4android Well-Known Member
    Thread Starter

    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.

    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 (Text):
    2. 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 :)

    Attached Files:

    #5 ac4android, Mar 26, 2016
    Last edited: Mar 27, 2016

Share This Page