Questions tagged [horizontalscrollview]

A layout container for a view hierarchy that can be scrolled by the user, allowing it to be larger than the physical display

HorizontalScrollView is a layout container for a view hierarchy that can be scrolled by the user, allowing it to be larger than the physical display. 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.

936 questions
228
votes
9 answers

HorizontalScrollView within ScrollView Touch Handling

I have a ScrollView that surrounds my entire layout so that the entire screen is scrollable. The first element I have in this ScrollView is a HorizontalScrollView block that has features that can be scrolled through horizontally. I've added an…
Joel
  • 6,193
  • 6
  • 22
  • 22
88
votes
6 answers

How to implement HorizontalScrollView like Gallery?

I want to implement Horizontal ScrollView with some features of Gallery, In Gallery the scroll made at some distance it arrange in pair, i.e If we have three images shown in screen, clicking last image will arrange at center. How would I implement…
Jayesh
  • 3,661
  • 10
  • 46
  • 76
86
votes
1 answer

Hide Scrollbar of HorizontalScrollView

How can I get rid of the scrollbars on a HorizontalScrollView?
Ostkontentitan
  • 6,930
  • 5
  • 53
  • 71
58
votes
5 answers

HorizontalScrollView inside SwipeRefreshLayout

I implemented the new SwipeRefreshLayout component in my application and it works well with any vertical views, like ListView, GridView and ScrollView. It behaves very bad with horizontal views, like HorizontalScrollView. When scrolling to the right…
Lior Iluz
  • 26,213
  • 16
  • 65
  • 114
38
votes
6 answers

Horizontal scrollview snapping react native

Hi I am trying to achieve scrollview snap to center like below gif link Check This Gif But unable to do so. Following is my react native code to achieve this. or is there any method to scroll to particular index of scrollview elements like…
31
votes
6 answers

React-Native Horizontal Scroll View Pagination: Preview Next Page/Card

I want to to a horizontal ScrollView with pagination enabled with one special requirement: each page (or card) is 90% of the container wide. The remaining 10% should be a preview of the next page. It is possible to do this with ScrollView? Can I…
30
votes
7 answers

Android: HorizontalScrollView smoothScroll animation time

I have a situation in that I am using a horizontal scroll view with images and using buttons to smooth scroll to the different image locations. Now it works okay I was just wondering if anyone knew of anyway to slow down the smooth scroll method,…
somin
  • 323
  • 1
  • 4
  • 12
23
votes
1 answer

HorizontalScrollView with centered elements

I have a HorizontalScrollView that is filled dynamically with TextViews. Sometime there is one, two, three or more elements. What I'm looking for is a way to have the items centered regardless of the numbers of elements. For example, With one…
Thierry Roy
  • 8,452
  • 10
  • 60
  • 84
22
votes
6 answers

Center elements of HorizontalScrollView when not enough to make it scroll

I have a Layout with a HorizontalScrollView containing a LinearLayout for a Menu where the contents are inflated with the contents of the DB. This works fine however when there are not enough elements to make the HSV scroll this does not fill the…
Alasdair
  • 566
  • 1
  • 4
  • 16
22
votes
9 answers

How to programmatically scroll an HorizontalScrollView

I have an HorizontalScrollView which contains a RelativeLayout. This layout is empty in the XML, and is populated from java in the onCreate. I would like this scroll view to be initially somewhere in the middle of the RelativeLayout, which is way…
Benoit Duffez
  • 11,839
  • 12
  • 77
  • 125
18
votes
2 answers

Android setting position of hortizontal scrollview

I am trying to set the position of the horizontal scrollview so it corresponds with the button that is pushed. I've tried using this to set it unsuccessfully: HorizontalScrollView hsv = (HorizontalScrollView)findViewById(R.id.ScrollView); int x,…
Nick
  • 9,285
  • 33
  • 104
  • 147
17
votes
2 answers

Marquee effect for Linear Layout

I am trying to implement marquee effect to the layout to help it scroll/animate from right inner side to left inner side just as the ticker view. From the below two links, you would be able to get more knowledge just as stock markets keep users…
15
votes
6 answers

listening to scroll events horizontalscrollview android

I am trying to listen to the event when the HorizontalScrollView is scrolled. Tried this but it does not print anything. HorizontalScrollView headerScrollView = new HorizontalScrollView(this); headerScrollView.setOnTouchListener(new…
i_raqz
  • 2,919
  • 10
  • 51
  • 87
14
votes
4 answers

Android: Moving background image while navigating through Views

What I want to have is a background image, which behaves like the stock homescreen or the weather app here: https://youtube.com/watch?v=i2Oh4GL5wBE#t=0m54s I just need a not animated background image (like the road in that video) which scrolls "a…
Rainer
  • 598
  • 1
  • 4
  • 16
13
votes
5 answers

React-Native | ScrollView right to left

I've got a simple ScrollView:
RonZ
  • 743
  • 1
  • 11
  • 31
1
2 3
62 63