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

  • SEARCH
  • Home
  • 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 6356473
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T22:58:10+00:00 2026-05-24T22:58:10+00:00

I am developing an Android app and one of its use cases is to

  • 0

I am developing an Android app and one of its use cases is to display the following situation.

  1. I have a list of links (L). Each of these links is the URL for a
    picture in the Internet;
  2. I have to download each picture of (L) and display it in a ListView. There should be two rows in the ListView(s), where I can insert the pictures. I want to do something similar to this app;
  3. I have to display the pictures in a HorizontalScrollView;
  4. The pictures have to be downloaded on demand, in other words, I just
    download the picture using a Thread when the HorizontalScrollView is
    in a position that shows this picture (similar to this
    situation
    ).

My questions:

  1. Is it possible to insert an ListView in a HorizontalScrollView? (If yes, how do I do it?)
  2. How do I use HorizontalScrollView? I mean, is there any difference on how I use a ListView inside a ScrollView?

  3. Do you know any plugin/project that has the same purposes?

  • 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-05-24T22:58:12+00:00Added an answer on May 24, 2026 at 10:58 pm

    Question 1 – Perhaps you should re-think your design to use a list of HorizonzalListView.
    Question 2 – You can created a list of HorizontialListView programmatically, place them inside a LinearLayout wrapped by a vertical scroll view.

    Your myhlist.xml layout:

    <?xml version="1.0" encoding="utf-8"?>
    <ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
      android:orientation="vertical"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent">
    
      <LinearLayout android:id="@+id/list_of_hlist_placeholder"
        android:orientation="vertical"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent"
        android:layout_gravity="center_horizontal"/>
    
    </ScrollView>
    

    You activity:

    public class ListOfHListlActivity extends Activity {
    
    /** List of ArrayAdapter with each bind to a HorizontialListView created programmatically */
    private List<MyAdapter> myAdapters = new ArrayList<MyAdapter>();
    /** List of your data model */
    private List<Object> myDataList;
    
    /**
     * Worker thread running in background doing dirty job.
     */
    private class DoDirtyJobAsyncTask extends AsyncTask<Void, MyAdapter, Void> {
    
        @Override
        protected Void doInBackground(Void... params) {
        // do your dirty job here, to populate myDataList
            for (Object myData : myDataList) {
                MyAdapter myAdapter = new MyAdapter(myData);
                myAdapters.add(myAdapter);
                publishProgress(myAdapter);
            }
            return null;
        }
    
        @Override
        protected void onProgressUpdate(MyAdapter... myAdapters) {
            int currViewId = 1;
            for (final MyAdapter myAdapter: myAdapters) {
                HorizontialListView listview = new HorizontialListView(getApplicationContext(), null);
                listview.setId(currViewId);
                listview.setAdapter(myAdapter);
                listview.setOnItemClickListener(new OnItemClickListener() {
                    public void onItemClick(AdapterView<?> parent, View v, int position, long id) {
                    // I am clickable.
                    }
                });
    
                RelativeLayout listOfHListLayout = (RelativeLayout) findViewById(R.id.list_of_hlist_placeholder);
                // don't forget set height here, you know the height issue in HorizontialListView
                RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(
                        RelativeLayout.LayoutParams.FILL_PARENT, 40);
                listOfHListLayout.addView(listview, layoutParams);
                currViewId++;
            }
        }
    
    }
    
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        new DoDirtyJobAsyncTask().execute();
        setContentView(R.layout.myhlist);
    }
    

    }

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

Sidebar

Related Questions

I am developing one android app in that i have to post some message
I am developing an animation app in the android. i have one big image
i am developing an android todo list app to learn. right now in my
Hi I'm developing an Android app and trying to incorporate maps into one of
I'm developing a webapp+android app that has its own registration flow - simple authentication
I'm developing an Android app and I'm in a situation where I need to
I am developing an Android app, this app has a dozen of Activities, each
I am developing an android app which has a button in one activity and
I am just getting started developing my first Android app, and one function that
I am planning on developing my specific voip app for android. Here's the scenario:

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.