Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9061401
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T15:28:31+00:00 2026-06-16T15:28:31+00:00

For the Android application I am currently creating I would like to have a

  • 0

For the Android application I am currently creating I would like to have a simple image gallery. Ideally it would be a single line of images with a horizontal scroll bar (much like this: http://www.appszoom.com/android_applications/multimedia/3d-gallery_hbij.html although the 3D effect isn’t necessary).

I know that the Android API used to have the Gallery Class which would have been perfect, but now this has been deprecated. Now I have managed to create a simple gallery using LinearLayout and HorizontalScrollView as such

XML:

   <HorizontalScrollView
         android:id="@+id/hor_scroll_view"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">
        <LinearLayout
           android:id="@+id/gallery"
           android:layout_width="wrap_content"
           android:layout_height="wrap_content"
           android:orientation="horizontal" />
    </HorizontalScrollView>   

Aesthetically this is perfect; looking exactly how I want it to (I don’t see the significance of posting my code but I am more than happy to upon request). The problem with this lies in the functionality. It’s important that the user has the ability to select an image from the gallery list but this seems to be impossible using my current approach. I have read that a ViewPager could also be used but from my understanding it seems that this would also be impossible to select individual images from. GridView would be my next choice as one can implement the OnItemClickListener however surely this will pose a problem of dynamically adding columns when the user takes a photo.

So my question is simply: how do I go about achieving this functionality of selecting individual images?

As a final note: I am fairly new to Android programming but am highly proficient with Java.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T15:28:32+00:00Added an answer on June 16, 2026 at 3:28 pm

    In the end I considered using a ListView for my image gallery as it being a subclass of AdapterView allows one to use the setOnItemClickListener. The problem with this however is the ListView only provides a vertical list and I needed a horizontal one. So after some digging I managed to find someone who had created a HorizontalListView and it is perfect. You can find it here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently developing an Android application that fetches images using http requests. It would
What's currently happening with my android application: I mapped a simple image to a
I am currently developing an android application using eclipse and I already have a
I'm currently in the process of creating quite a large scale Android application. As
I'm currently creating an Android application with Eclipse and in the build sdk for
I have used Android phonegap application for creating dynamic list with label and corresponding
I am creating an application that will have multiple images on the screen, these
Currently creating a VOIP application for Android and I was wondering is there any
I have an Android application that uses C2DM. I am creating another application derived
I am currently creating an android application with different options. One of the option

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.