Animate Group Expansion in expandable list view - android

I am using expandable list view for my app. Everything is working correctly, but I want an animation when a group is going to expand i.e all the childs should come with an animation when a group is clicked. Does any one of you have any luck in this regard?

Related

Swipe and tap to enlarge recycler view

I have a recycler view which has its items in a card view. The recycler view gets its data from a sql database within the app . Now I want to implement two features to this recycler view items. First , whenever the individual cards are tapped , I want them to enlarge and display more data and should shrink back when tapped again. It is not like the case of expandable list view where it expands into a child list view. I want the height of the card to increase and just show some more information and buttons. Second I want the items to swipe left . I know there is a feature for that in recycler view , but I want to customise the swipe feature. Swipe from right should be locked , and when swiped from left , It should not go off list completely. It should show two buttons and should go off list only when one of the buttons is clicked. I have been looking , but there is no proper explaination anywhere. Please guide me through this process.
For your first question, set the adapter layout_height to wrap_content and set the buttons visibility to GONE. Implement the OnClick listener in the RecyclerView adapter and set the visibility of the buttons to VISIBLE if GONE and GONE if VISIBLE or use a boolean to alternate the visibility.
For your second question, this might help:
https://www.learn2crack.com/2016/02/custom-swipe-recyclerview.html
How can I make my Android SwipeableCardViews more like the IOS 7 mail app (swipe to show buttons)
https://github.com/daimajia/AndroidSwipeLayout

GridView delete multiple items like iphone apps uninstallation View

I have a GridView in which I am showing list of books. I have tried by creating custom layout and putting cancel button onlongclick listener of a view. But i am not able to apply a shaking animation to the items. Can anyone guide me how can i apply an animation to the items and make it similarly like iphone?
Now I want to provide feature to delete the Multiple items from the GridView like the View which shows as below:
I did lots of research for this ,but failed to get such kind of view in Android.
Can any one guide me for this?
You'll have to make a custom gridview for that. Place a button (x) on top of the grid item and set its visibility to invisible.. onLongPress of the grid item, make that button visible.. onclick of the button, delete that grid item by getting its id.
Hope I have given you a direction.

Adding More than one item in the list view row and navigate them

I want to make the following layout in android. (Image Attached)
There is a list view and each item in the list view can has as many sub items. (One is visible in one row at a particular time), if a person wants to see further items in a particular row, then he has to use arrows provided on the left and right side of the item in the list view. (Image Attached)
On the arrow click, there should be a pager swiping type view and the next layout should come in the row.
I have tried so many approaches to do the same but have been stuck somewhere and have not been able to do the same yet:
Here I have tried all these :
1st Try
2nd Try
3rd Try
4th Try
Can anyone please tell me how to do the same functionality as shown in the figure attached and discussed above
Alright.
Try this, this should work.
Solution 1:
Have Horizontal Scroll view as child in listview, so basically you have s child now with horizontal scroll ability
Add as many as children you want to this scroll views, you can easily adjust layout of childs within scroll view to display.
Solution 2:
Have a ViewFlipper as a child withing listview
Perform the same thing as above, add as many child you want within this flipper
With flipper you get easy hastle free option like which child you want to display by default withing flipper.
Hope it help.

Expandablelistview collapses the 2nd level groups on scroll

I am trying to implement a 2-level expandable list view. I found the reference for the same from here : http://www.allappsdevelopers.com/TopicDetail.aspx?TopicID=c991d70a-4570-4e4b-8378-2191a4247a84
This works fine. But as soon as i scroll the list view or i click on another group, the expanded children get collapsed.
I would like to preserve the expanded groups.
Any help appreciated
When you scroll a ListView the views are recycled and hence if you want to keep your group expanded you will need to maintain a list of the clicked groups.

How to make custom view scrollable along with Expandable List view ...?

I have a one custome view and on expandable list view.
list is scrolling fine but when i tried to place both in a scroll view its not working.
I decided to place the custom view in one of the element in the expandable list view.
But, each element in the list has two items Group and Childs.
How to replace both of them with my view at first position...?
Thanks in advance...!
Finally i got a solution for this.
Load your custom view into the ExpandableListView as Group with 0 children.
Then make group indicator invisible.. that's it. :)

Categories

Resources