I'm just curious.
Is it possible to combine an ExpandableListView with a Swipe-function in Android? To explain what I mean, imagine this scenario:
You touch an item in the list, a view is expanded. In this View you are able to swipe to left/right in order to view a new View without changing the background.
Comment if you don't understand, please!
Thanks in advance!
I am not sure about the version of Android you are using, but if you can use the AppCompat library v22, you can actually use a CoordinatorLayout and do an expansion of the view onTouch. Afterwards, in one of your child layouts, you can set the SwipeDismissBehavioron the expanded view (which should be a child of your CoordinatorLayout). This is one of the coolest new functionalities in Android. You should read more about it here.
http://developer.android.com/reference/android/support/design/widget/SwipeDismissBehavior.html
You can use https://github.com/tycallen/SwipeMenu-Expandable-ListView for Swipable ExpandableListView.
Related
I am trying to design a recycler view with expandable design , it will have groups which on click would open and show child views. But the child views need to support linear layout and grid layout as well.
Currently I am using a recycler view within another recycler view to achieve the same, and used expandable layout for expanding collapsing items. This does get me the desired effect but neither is it a good programming practice and nor is it bug free. It does some unexpected things at all times, which is really annoying and a bad UX experience.
Please tell me other reliable and bug free ways to do it.
This image is approximately what I am trying to achieve. Cannot show the actual work I have done because of company policy.
I am not asking to source code to solve my problem, but some general design directions to achieve the same goal. As mentioned before, what I did, using recycler view inside another did do the trick, but also created other problems(unpredicatble behaviour to say the least.)
It seems like using nested scroll view and setting the inner recycler views to 'setNestedScrollingEnabled(false)' did the trick. Now I can make what I wanted to after all.
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.
I need to show a view sliding up for all my pages(fragments). Just like navigation drawer working. I don't want to include layout in every view and animate. Please suggest a solution
Create a common base class that your fragments extend from. What is the purpose of the sliding view? Does is just animate a scroll within a fixed space? Does it move above it up when it animates in? Does it overlay over the view as it slides up? Need more clarification.
You can use something like AndroidSlidingUpLibrary.
I'd avoid using it for scrolling views, it is nice though.
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
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.