I used buttons in HorizontalScrollView. normally when scroll right, after the last
button I have to scroll left. But I want to know when scroll right
after the last button it should show the first button. not want to
scroll left.
just as circle.
thanks
I don't know how to do that trick with horizontalScrollView, i thought that it's impossible, but i know one widget, that maybe can help you
http://code.google.com/p/android-wheel/
unfortunatly, it's only vertical, and you can't put buttons into it. I tried to make it horizontal, but failed. Maybe, if you will need, you'll get more luck
Related
I have been looking for a solution for this for a while now, What I'm trying to do is an application with drag animation like Tinder, the difference is that I have 3 images at once, one below the other and all of them are in ScrollView. My problem is that when I'm touching to move it up and down the ScrollView takes place, I can move it freely left and right but if I move it up/down even by one pixel I lose it. I've tried to make custom ScrollView that disables the touch of it when I touch the other View's with no luck :(, I thought maybe try and make the views that I want to drag to be at the top of the views with the Z-index and I couldn't find anything about it. I saw some answers like the dispatchTouchEvent and intercepTouch or something like this but I didnt understant how to work with it.
Sorry for my English, Thank you!
Found the answer, I used getParent of the view until I get to the scrollview as parent, and used requestDisallowInterceptTouchEvent(true) that solved it!
I have multiple textviews inside a horizontalscrollview. Now I want to scroll all the textviews inside it so that all multiple textviews gets displayed. How can I achieve it ?
Thanks in advance.
Here is one git project. Its a scroller the scroll automatically and continously. It was made to show a credits screen by continously scrolling through a list of images.
This might help you or give you some idea.
https://github.com/blessenm/SlideshowDemo
I have a scrollview inside which I have 5 imageviews say IMV1,IMV2...IMV5 . Now on scrolling,one by one all imageviews are shown in device screen. Now I have a drawer with 5 buttons say 1,2 ..5.
Now take us a scenario,
Currently I am on first imageview. Now when I click on button 5 in the drawer.
I need IMV5 to show on the screen without scrolling.It can be obtained
through smoothScrollBy/scrollTo to y equal to 5*screenHeight. But here it
scrolls through all intermediate imageviews.
Please note,I don't wish to affect scroll feature.For above example,
After I reach IMV5,when I scroll up,it should scroll to IMV4 and so on.
Is there any way to obtain it .Please suggest.
Thanks In Advance.
P.S. If you need some more clarification,please let me know.
You can achieve this easily using a ListView instead of ScrollView.
What you can do is:-
Add all the imageviews to a ListView.
This will fulfill your scrolling requirement, as ListView automatically handles scrolling if its content's size is grater than the screen size.
Now use the listView.setSelection(position) on click of the buttons.
It will scroll to the selected imageview without giving the scrolling effect
Hope this helps.
It can be achieved through ScrollView too.. All you need to do is get the View at that position. Then call requestFocus() on the obtained view.
For example:- If you press Button 5, then IMV5.requestFocus() will do it for you
I want a single cell of a grid to take up my whole screen and swipe up/down/left/right to access other cells (not smoothly, but switch to the next cell). What do you think is a good way of implementing this?
I've partially implemented this in GridView and ListView containing a HorizontalListView and am considering TableLayout.
Any advice?
I would start with the DirectionalViewPager on github and try to modify it so that it can always swipe in any direction instead of having to call setOrientation(DirectionalViewPager.VERTICAL)and setOrientation(DirectionalViewPager.HORIZONTAL) I don't know exactly how much you'll have to modify it, but it is most of the way there, I would think that the change should be relatively straight forward.
How about you take a look at this. the horizontal paging(swipe views)
I need some help, i want the android scrollview animation effect....
Basically when the someone click on the textview of linearlayout in scrollview another horizontal view should come in.
Here is the pic....
What you could do is setup ontouch() on the textview. once you touch it then you would make the layout visible with setVisiblity(). you could even add in a animation to make it more professional.
You would probably get a bug if you didnt make every other view GONE, when you touch a new textview.
I like this idea and I might work around with it myself!
Good Luck