I want to make custom Relative Layout which can handle Zoom and Scroll both. Any good example where i can learn about the Custom RelativeLayout which does the same or little.
Thanks for the help.
Related
I can not use android gallery view since it is deprecated. I need to implement it using horizontal scroll view. but there is no view recycling ability default. can any one suggest how can I implement it with view recycling functionality.
You should Go with ViewPager. i.e android.support.v4.view.ViewPager
1) It Help you to get Horizontal Scroll Swipe
2) It also Recycle the View as you wanted
Follow this tutorial
Here
Hope this is HelpFul...
I am looking for a layout for my custom views. I have two view with me. Let me call the first view as 'V1' and the other 'V2'.
The V1 will be more like a background for the whole layout. The V2 will be dynamic say, based on the pinch or by a button click the view will zoom. I want this view to get pannable and scrollable so that the user can view V1 even if it grows larger that the screen.
Is there any way I can do this...?
Happy coding..
i want to Override the onTouch event and get the image view from the gridview
and drag it to new place on the grid ?
I'm not sure if this is the kind of thing you're looking for, but here's a drag-and-drop grid I developed that might help you:
https://github.com/thquinn/DraggableGridView
It allows you to long press a child view and drag it to another position in the grid. It's animated, too!
Android Developer has a nice discussion on writing your own View subclasses:
http://developer.android.com/guide/topics/ui/custom-components.html
But I want to write my own ViewGroup subclass with my own child positioning policy. Where is there a minimal example of this kind of thing? (This is a Java coding question not an XML one)
Specifically I want a horizontal layout that (like LinearLayout) fills in children from the left - but once the horizontal space is consumed, shifts the children to the left so that the last child appears aligned to the right end of the layout. The children are button-like and so a HorzontalScrollView does not work since the scrolling gesture clicks the buttons instead of moving them.
If LinearLayout has an option to do this, I could not find it.
HorizontalScrollView should work, scrolling should not click the buttons. But if you really want to write your own custom layout, have a look at this archive (the video is also available)
I have an Linear Layout inside the View Flipper. When i fling/swipe the layout the same layout reloads the same layout with the animations slide_left_out and slide_right_in. I just have only one layout view. it has the values the image view and text view. When i swipe the view it just change the next value to that views. Any Idea?
How did you add the swipe/fling functionality? In other words, when the screen is "flung", that's where your code has to come in and "flip" the viewflipper to a different layout.
AFAIK There isn't a built-in way to fling the viewflipper without having to write some code to handle the fling and manually change the viewflipper layout (index).
EDIT:
Basic Gesture Detection
Flipping Views using ViewVlipper.setDisplayedChild()