PopupWindow with swiping scrollable views - android

I'm trying to create a Popupindow in which the views can be changed by swiping. Each view should also be scrollable when larger than the popup window. I also want to move only one view when swiping. I can't find any simple way to do that (the Gallery move several views when swiping).
Is there any widget I missed or do I have to implement everything to achieve that (with ViewFlipper and gesture detection for instance)?
Anybody can help with the best way to do that?
Thanks

I've found and ended up using the fantastic HorizontalPager.

Related

Show/hide a layout on scroll up/down android

I am working on an android application and want to implement a functionality in which I want to show a layout which will contain Like/Comment of that content at the bottom of the page.
I want this layout to be shown when I scroll up the page and hide when I scroll down the page.
I have scene many applications that have implemented this feature, but I have no idea how to implement this feature in my app.
Please check this link of the app which is giving the same functionality which I want to implenment https://play.google.com/store/apps/details?id=com.midsizemango.materialapps
Please help if anyone have idea here, Thanks a lot in advanced.
You need to do the same thing which happens with fab, first create a class extendingCoordinatorLayout.Behavior<View> and implement it like other fab examples. just remember that it won't work on simple listView and gridView.
Also here's a good detailed tutorial for you.
You Just have to set Scroll-Up & Scroll-Down listener of your Recycler view or Scroll View check Reference link.
Now base on Scroll-Up & Scroll-Down listener set VISIBLE / GONEof your footer view either it is LinearLayout or Toolbar with animation.

android animate views inside a scroll view while scrolling

Is there example android code or sample android app which demonstrate animation of the views while scrolling.
For example. In a scroll view some items are not visible when you scroll the items will start to come inside the screen that time i just want to animate that view.
any help would be greatly appreciated.
Thanks.
Download this app. Here you will find tons of libraries of your use. I also seen the library which your are asking in this app. You will find source code links in the app as well.
https://play.google.com/store/apps/details?id=com.desarrollodroide.repos&hl=en
Or You can do one more thing
Just add on scroll listener and some more listeners are there by which you can detect which portion of your scroll view is visible.
Then You can add animation to those views.
Try Listview animation library.
Modify it and use.
https://github.com/nhaarman/ListViewAnimations

Android: I want to swipe between cells of a grid where only one cell is visible at a time

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)

How to use Android HorizontalScrollView to move image one by one

I want to create an image slider using the HorizontalScrollView. Indeed, the slider will display one image at the time and I want to be able to use the fling gesture to navigate left and right in the slider.
Any Idea to which methods to override in the HorizontalScrollView to achieve this.
Thanks a lot.
Best
You could use Gallery with Image Switcher view to achieve this
This Link is usefull to you for better way to implement Android HorizontalScrollView to move image one by one.
Link :http://saigeethamn.blogspot.in/2010/05/image-switcher-view-android-developer.html
video: http://www.youtube.com/watch?v=c6a6wTfSPJA
EDIT :
If you want to implement Complex way refer this Links
Link1
Link2
You'd be better served implementing this with a Gallery widget or a ViewPager. These elements handle the display and interaction portion for you; you just have to provide the data behind that. If these don't quite work for you, better to customize one of them then start all the way from scratch.
Gallery Docs
ViewPager Docs
You can use any of below things for your need
Gallery - A view that shows items in a center-locked, horizontally scrolling list.
ViewPager -Layout manager that allows the user to flip left and right through pages of data. You supply an implementation of a PagerAdapter to generate the pages that the view
shows.
HorizontalScrollView -Layout container for a view hierarchy that can be scrolled by the user, allowing it to be larger than the physical display
for reference see these links - Gallery , ViewPager and HorizontalScrollView

Android Multiple Views

I am trying to make an app that will have multiple screens, and I want to be able to swipe left and right to go back and forth from screen to screen. Basically like how you go through pi ctures in the gallery, but mine won't just be pictures. Any tutorials or a suggestion on what type layout I should use.. TIA
Try HorizontalScrollView. If you want it to snap, you will probably have to write some code that sets the position of the scrollview correctly either on up touchevents, and/or intercepting those events to a GestureDetector with SimpleOnGestureListener to catch flings specifically.
You can have this effect using ViewFlipper...
http://www.warriorpoint.com/blog/2009/05/26/android-switching-screens-in-an-activity-with-animations-using-viewflipper/
You need to apply gestures. This link could help you which explains the same you need:
http://www.anddev.org/view-layout-resource-problems-f27/swipe-fling-to-switch-between-activities-t15602.html
You can try using a Gallery View with an adapter that returns the views you want to scroll with. But it's going to be a pain laying out the views...
You can do something like the launch screen has.
http://blog.velir.com/index.php/2010/11/17/android-snapping-horizontal-scroll/
also:
Flingable Tab Host
also:
Android Snapping HorizontalScrollView
and finally:
Horizontal Pager

Categories

Resources