Swipe to refreshlyout with Recycler and expandable listview - android

I have to create one screen which includes two lists
1) Recyclerview
2) expandable listview
When Recycler is Visible then i have to hide expandable list and when expandable list visible i want to hide Recyclerview. Everything is working fine. but i have some confusion i need to add swipe to refresh layout for both lists, how can i achieve these ? My problem is when there is no data in recycler view and expandable list swipe to refresh isn't working as expected . Any one have suggestions what should i do now?

You may use cache to store the data which is used in recyclerview and expandable list view formerly and then try refreshing the cache.

Related

Show recycler view on a page by page basis

Im trying to achieve this recyclerview layout with arrow button that will trigger scrolling item
then, I have 2 choice to manipulate the view
Split the list inside adapter
Split the list inside viewmodel and bind it into adapter separately.
What should I choose between 2 of them. Or if you guys have any better idea please comments :)

collapse recyclerview with different view types

So, I have a recyclerview with multiple view types. I'm using this link to generate my adapter class, becauseI have multiple viewholders in my recyclerview. Now the problem I have is with collapsing certain items inside it. What I want is whenever I press
the green toggle, item 2 and 3 in the list should collpase but 4,5,6 should remain upon,unless you have clicked on the green item ofcourse. I tried many ways to approach this but I can not achieve this with the link provided. Is there any way I can achieve this?
When you click collapsing button you have to remove your collapsing data from your all source list. When you remove your item from your list recyclerView automatically animates it.After that when you want to show it again you have to insert it your list again and notify that.RecyclerView also animates again when you insert it. There is a useful link here for inserting and removing special data from recyclerView https://medium.com/#suragch/updating-data-in-an-android-recyclerview-842e56adbfd8

Android Expandable ListView Child Click

I am using a view flipper.Expandable list view is also a child of that viewflipper.I want to open another child of viewflipper when i click on child of expandable list.And i also want to send data of expandable list's child on click event.
Use the below link.
http://stackoverflow.com/questions/6947267/android-use-viewflipper-to-flip-individual-items-within-a-listview
It have an example of ViewFlipper to flip individual items within a ListView

Display only child items in Expandable list No need of parent indicator

Hi i am displaying items according to different categories using Expandable Listview.Now I want to display only items ,No need of parent name or parent indicator.is there any solution from expandable list view to diplay only child items .I don't have time Thats y i am displaying items from expandable list view(I am alredy developed this one) .So please give me some suggestions.It is very urgent.thanks in advance
I think you cannot have child view without group view in ExpandableListView. Which adapter you are using for populating group and child view?
You should use lisview instead which is easy to used.

I want to scroll two ListView in a layout

I have 2 ListView in a layout. I want each ListView show all their items. And scroll the whole layout.
A answer from one of the ListView Developers from the GoogleIO is: Never put a ListView in a ScrollView. This means if you want a ListView that is not scrolling as you are trying to do you maybe don't need a listview at all.
You could create a ListView put a Linearlayout in it and use the Adapters from the two Listviews to manually add the items of the list via linearlayout.addView Now you have one scrollable view that contains all items of the list. Because there is no recycling and only loading of the items in the list this is very inefficient and only usable if you don't have that much items.
The second more complicated way that you can go if you have say 20 items in each list is to use a custom adapter that takes the two listadapters and let you put all the items in one list.

Categories

Resources