3

I am working on an android application where i am implementing horizontal scroll view. I have come across two issues and cant really figure out how to fix them. They are:

  1. when the horizontal scroll view reaches its left most or right most end, the left/right image button should become inactive.
  2. When i click on a button(which appears half) in horizontal scroll view, the button should appear at the center with full visibility.

The below is the screen shot:

Screen Shot

Shrikant Ballal
  • 7,067
  • 7
  • 41
  • 61
krisDrOid
  • 3,252
  • 3
  • 25
  • 36
  • [This question](http://stackoverflow.com/questions/3948934/synchronise-scrollview-scroll-positions-android) explains what to do to disable the buttons when you reach left/right end – Aleks G Jun 27 '12 at 11:11
  • this might help you http://stackoverflow.com/questions/7002282/android-calculate-scrollto-position-in-horizontalscrollview. to enable or disable left/right buttons use button.setEnabled(true or false) depending on the the HSV focused position (0 or last item) – sunil Jun 27 '12 at 11:12
  • i guess you should also post your code – MBMJ Jun 27 '12 at 11:13
  • And [This question](http://stackoverflow.com/questions/4628800/android-how-to-check-if-a-view-inside-of-scrollview-is-visible) should help with the highlight selection – Aleks G Jun 27 '12 at 11:14
  • @SidratulMuntaha In the code there is nothing much just i have registered the hsv and in the xml hsv has buttons – krisDrOid Jun 27 '12 at 11:23

0 Answers0