Pannable layout for custom view - android

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..

Related

how to drag two view simultaneously

I just want to know how to drag two views at the same time
first view is its original image view
Second one is its shadow
I am using dragShadow builder to build a drag shadow but when I drag a view using touchlistner it is only drag shadow of my main view and the main view is stick on their position ..
so my question is Is there any solution to enable drag both view simultaneously?
thank you for any kind of suggestion..
attach a picture
Wrap both ImageView and shadow in ViewGroup, for example, FrameLayout, and drag FrameLayout instead of ImageView.

How to drag and Drop a view from image view to a listview?

I have image view on left side and a list view on right side. I want to drag the image view from left side to list view in right side. I have seen many examples in which a view can be moved from one view to another, provided all lies in the same layout. My problem arises here. My list view and image view both are in different layout. Also for tablet design, both image view and list view are in different fragments. So how can I drag and Drop image from one fragment to another. Could anyone guide me to the right way to do it in both cases. Any help in this case is highly appreciable.

Custom Viewgroup that can handle Zoom and Scroll

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.

how to design this UI

I am trying to design a UI as like in an iPhone app. The image of the design is as follows
In the above image all the white boxes are of a list view. In those list view i am placing an image View and two set of text view. I have placed a overall custom list view and in that custom list view using relative layout i have place the image view and two text view.
now i want to draw a line between the two text view and when i click on the second text view i am moving to a new activity. At that time i want to show that only the second text view is been clicked.
Use a RelativeLayout:
The image android:layout_alignParenLeftt="true"
the first two textViews android:layout_toRightOf="#id/myimage",
the other textviews below the previous ones (e.g. android:layout_below="#id/author" and with a layout_width="fill_parent"
Check Romain Guy's blog post for a tutorial on a similar (simpler) setup: http://android-developers.blogspot.com/2009/02/android-layout-tricks-1.html
Check this http://www.androidsnippets.com/clickable-listview-items
The ClickableListAdapter bases on the
API-Demo-Example "Efficient List
Adapter". It was refactored to provide
a better reusability. Additionally,
you can connect OnClickListener and/or
OnLongClickListener to each View of
your list item. This allows you to
create complex interactive lists, or
simply using a customized checkbox
version.
I had implemented this in a project minus the image view. Heres a screenshot.

how to make image view drag and drop on gridview android

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!

Categories

Resources