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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T02:17:14+00:00 2026-05-16T02:17:14+00:00

I want to display the grid view elements in only one row that means

  • 0

I want to display the grid view elements in only one row that means i want horizontal scrolling in grid view.Each time i want to display only 5 elements only in one row.For this give me some suggestions.Thanks in advance.
below is the my layout code

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

<ImageView 
android:id="@+id/ImageViewlarge" 
android:layout_width="wrap_content" android:layout_height="wrap_content">
</ImageView>
<TextView 

 android:id="@+id/TextViewImageName"
  android:layout_width="wrap_content" 
  android:layout_height="wrap_content" 
  android:layout_gravity="center_horizontal" 
  android:editable="false">
  </TextView>
<LinearLayout
android:layout_width="fill_parent"
android:orientation="horizontal" 
android:gravity="bottom" android:layout_height="fill_parent">
<ImageView
                       android:id="@+id/ImageViewLeft"
                       android:clickable="true"
                       android:focusable="true"
                       android:layout_alignParentLeft="true" 
                        android:src="@drawable/leftarrow" android:layout_height="50sp" android:layout_width="30sp" android:layout_gravity="bottom|left">
       </ImageView>
<GridView 
android:id="@+id/GridView01"
 android:scrollbars="horizontal" 
    android:layout_height="wrap_content" 
    android:fadingEdge="horizontal" 
    android:scrollbarAlwaysDrawHorizontalTrack="true"
     android:scrollbarAlwaysDrawVerticalTrack="false" 
     android:numColumns="5" android:layout_gravity="center_horizontal" android:layout_width="260sp">
 </GridView>
 <ImageView 
                     android:id="@+id/ImageViewRight" 
                     android:clickable="true"
                     android:focusable="true"                   
                     android:src="@drawable/rightarrow" android:layout_width="30sp" android:layout_height="50sp" android:layout_gravity="right"/>
 </LinearLayout>
 </LinearLayout>

in that above code now i want to remove the that 2 image view and set the horizontal scroll to that grid view elements.For this give me some suggestions,Thanks in advance

  • 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-16T02:17:14+00:00Added an answer on May 16, 2026 at 2:17 am

    I believe the same effect could be achieved by using a LinearLayout with the orientation set to horizontal. The LinearLayout can be embedded in a HorizontalScrollView

    The documentation on HorizontalScrollView actually says this:

    A HorizontalScrollView is a
    FrameLayout, meaning you should place
    one child in it containing the entire
    contents to scroll; this child may
    itself be a layout manager with a
    complex hierarchy of objects. A child
    that is often used is a LinearLayout
    in a horizontal orientation,
    presenting a horizontal array of
    top-level items that the user can
    scroll through.

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

Sidebar

Related Questions

I have a Grid View. I added AutoGenerateEditButton=True . I want to display that
I have a list of images in grid view.I want to display a gallery
i want to display the count of grid view can anyone tell me what
How do I only display two colums in my grid view if the gridview
I want to display 15,000 items(images) in grid view, can I load all images
I want to display some text below each grid image. Please see my code
Hi I created one grid view application. it's display my sdcard images in my
i want to display images in grid view like rows and columns.if i click
I want to display and edit some objects in a WPF data grid and
I've following Grid to display data, now when I want to add new record

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.