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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T09:13:11+00:00 2026-06-08T09:13:11+00:00

I want to make a UI element like a GridView , I want it’s

  • 0

I want to make a UI element like a GridView, I want it’s complete functionality but want it to be horizontally scrollable rather than vertically.

By horizontal scroll I mean it should be built that way and not put in a HorizontalScrollView.

My would be Custom GridView will have fixed number of rows say 4-5 and the columns should be extensible based on number of items in the Adapter. You can think of it as the opposite of what the native GridView does, yet it should maintain the functionality.

I have looked at the source code of how a GridView is implemented by Google, but I am able to understand very less and starting to make the View from scratch doesn’t seem to be a good idea, since I am afraid I will not be able to do justice to memory optimization’s the way Google did it.

I had observed that GridView extends AbsListView, so my question is, is it AbsListView which lets a GridView scroll vertically and add items from the adapter, or is it GridView which adds the vertical scrolling ability? Should I tweak GridView or AbsListView?

It would be even better to know if there’s something which already does what I want to do?

This has already been implemented in native Gallery and YouTube app of Android Honeycomb 3.1 and above. So if anyone has an idea, please elaborate.

Snapshot of Honeycomb Gallery app:

enter image description here

Snapshot of Honeycomb YouTube app:

enter image description here

  • 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-08T09:13:12+00:00Added an answer on June 8, 2026 at 9:13 am

    There is setRotation in API 11. You’ll have to rotate the gridview by 90 degrees and child views by -90 degrees.

    Documentation: http://developer.android.com/reference/android/view/View.html#setRotation(float)

    Update:

    To get a 3d effect on views following APIs would be useful

    setCameraDistance(float) – set the z axis distance(depth)

    setRotationX(float) – set the horizontal axis angle

    setRotationY(float) – set the vertical axis angle

    Set the camera distance to half of the screen height. Then set the rotationX based on the view’s location on screen. The rotation angles should be something like (20, 10, 0, -10, -20) from left to right. Later you can play with rotationY angles to get some height perception.

    Do all setting in extended GridView‘s overriden layout method.

    @override
    void layout(int t, int l, int r, int b) {
        super.layout(t, l, r, b);
        ...
        int columnStart = getFirstVisiblePosition()/no_of_columns;
        int columnEnd = getLastVisiblePosition()/no_of_columns;
    
        loop from 'columnStart' to 'columnEnd' 'no_of_colmns' times {
            // set the camera distance and rotationX to views
            // depending on the position of a view on screen.
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an element, like this: <div id=navleft> </div> I want to make this
I want to make xml element like this: <ElementName Type=FirstAttribute Name=SecondAttribute>Value</Atrybut> Now I'm doing
I want to make something like navigation bar that can move whole element, without
I want to make use of complex usercontrols with more than one control element
Seriously, it seems like every time I want to make my UI elements talk
Lets clarify my question, I want to make an element which the element contains
I want make a bash script which returns the position of an element from
Let's imagine I want to make a templated function that returns the first element
I am trying to make a list like Element 1. bird Element 2. lion
In a SVG document, I want to make a <path> -element transparent. I tried

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.