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 9207821
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T00:28:20+00:00 2026-06-18T00:28:20+00:00

Hello Friends I have just started learning android by watch videos by Travis. He

  • 0

Hello Friends I have just started learning android by watch videos by Travis.

He has made and app having an Image slider in it. I followed each and every step and everything is working fine. He has used

Below is my XML code.

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

<ImageView
    android:id="@+id/IVDisplay"
    android:layout_width="wrap_content"
    android:layout_height="200dp"
    android:layout_gravity="center"
    android:src="@drawable/a"
     />

<Button
    android:id="@+id/setBG"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:gravity="center"
    android:text="@string/set_as_wallpaper" />

<HorizontalScrollView
    android:layout_width="200dp"
    android:layout_height="wrap_content"
    android:layout_gravity="center"
    android:fillViewport="true"
    android:scrollbars="horizontal|vertical" >

    <LinearLayout
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:orientation="horizontal" >

        <ImageView
            android:id="@+id/viewImage1"
            android:layout_width="125dp"
            android:layout_height="125dp"
            android:padding="15dp"
            android:src="@drawable/a" />

        <ImageView
            android:id="@+id/viewImage2"
            android:layout_width="125dp"
            android:layout_height="125dp"
            android:padding="15dp"
            android:src="@drawable/c" />

        <ImageView
            android:id="@+id/viewImage3"
            android:layout_width="125dp"
            android:layout_height="125dp"
            android:padding="15dp"
            android:src="@drawable/d" />

        <ImageView
            android:id="@+id/viewImage4"
            android:layout_width="125dp"
            android:layout_height="125dp"
            android:padding="15dp"
            android:src="@drawable/e" />

    </LinearLayout>
</HorizontalScrollView>
</LinearLayout>

Images are displaying right…but at a time there can be only 1 and a half image can be displayed…while there are many other images …so there I am using HorizontalScrollView to show a slider to slide the images.

This is the video which I referred http://www.youtube.com/watch?v=wp5sORsPopw

  • 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-18T00:28:21+00:00Added an answer on June 18, 2026 at 12:28 am

    You have set horizontal scrollview width android:layout_width="200dp" So to solve you problem replace it to android:layout_width="wrap_content".

    Like this : –

    <HorizontalScrollView
        android:layout_width="wrap_content"  <<SET it to wrap_content like
        android:layout_height="wrap_content"
        android:layout_gravity="center"
        android:fillViewport="true"
        android:scrollbars="horizontal|vertical" >
    

    To show the scrollbar in horizontal scrollview.

    Write this in layout file where you define horizontal scrollview.

    android:fadeScrollbars="false" which is equivalent to ScrollView.setScrollbarFadingEnabled(false);
    

    As you are saying I don’t think there is any problem in it. Its working fine. I have checked in emulator. Images are sliding horizontally fine!!

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

Sidebar

Related Questions

Hello friends, I am developing an app in Titanium and I have a tableview
Hello friends i am having problem in parsing jSON web services data I have
Hello friends i have a form view i have handele all needed events successfully
hello friends i have a check box list which contains all the courses kept
Hello friends I have three div tags on my page.. I am trying to
Hello Friends I am using a list box control in aspx page i have
Hello friends i have created two page one is index.html and second is about.html
VS2005, ASP.NET, C#, IIS6 Hello friends, I have a master page divided into three
Hello friends I am having trouble getting desired results using str_replace (); function of
Hello Friends i have the following query which defeat the very purpose. A day

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.