Swipe and change layout of an element of a listview - android

I am trying to achieve the following effect on my custom list-view: When the user swipes the list element to right the layout of the swiped list item would change its layout. I have tried the SwipeListView approach from GitHub but i didn't manage to implement that through.
Can you give me any ideas on how to achieve the desired effect?
Also please note that i used a merge adapter for a list-view with multiple headers and sections.
Thanks!

Maybe take a look at this question and the links that it provides to give you some ideas.

Related

Design swipe activity android

I need to make a layout similar to that Image.
I wish it were shown all the registered images and their attributes and a button to add the user would select an image and define the attributes of it. I do not want a complete example that ordered but at least one direction than I use to do the layout. By my research I should perhaps use a swipe view. Has anyone seen something similar?
Thank you
You can use ViewPager to display cards like in top part.
ViewPager with previous and next page boundaries
And use a ListView or RecyclerView to show the bottom part. https://code.tutsplus.com/tutorials/getting-started-with-recyclerview-and-cardview-on-android--cms-23465

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 horizontal swipe list item

must implement this design and functionality, but can not make elements horizontal swipe in list like picture on link.
I will be glad for any suggestions)
using this library https://github.com/47deg/android-swipelistview you can implement this.

Show and hide multiple textviews

I need to show/hide four textviews on pressing four buttons. The functionality is visible in pictures. In iOS I used button. But for android,can I use some sort of list view or something else suitable to thisenter image description here?
!First and second buttons are pressed here while third and fourth are not yet. Again pressing the button that is already pressed,text hides]1
You can use ExpandableListView.
Using ExpandableListView, you can have groups and childs, and you can expand and collapse any groups you want.
For example:
mExpandableListView.expandGroup(groupPosition);
mExpandableListView.collapseGroup(groupPosition);
These is a very good example on Custom ExpandibleList in Github.
https://github.com/tjerkw/Android-SlideExpandableListView
Hope this will help you to achieve smooth animation and collapse.
You need to change the layout as your requirement.
Hope this will help you.

List menu that open hidden views in it

I need to create a list menu where each item, when selected, will open a sub area with others controls (see the example image):
I have two possible solutions in my mind:
Have all the item's controls in RelativeLayout with "gone" visibility, and list them in a LinearLayout.
Use the ExpandableListView, but I have no experience with that and I don't know if this might be a proper solution in my case.
What do you think would be more elegant? Do you have other/better solutions?
You can use ListView as well as ExpandableListView to achive your requirent.
I have done some thing by using ListView and slide animation that suits your requirement.
For Complete reference go through my Android blog
http://amitandroid.blogspot.in/2013/03/android-listview-with-animation.html
Thanks,
Both approach would work but ExpandableListView should be better performance-wise.
You must provide a ExpandableListAdpater, with a layout for your group item and another for the subitems.

Categories

Resources