ListView and RecyclerView header item - android

I would like some information (a library or specific name) to try to do that.
I want a listview or recyclerview with an item or header that dont scroll and when another specific item is on top of the screen stay that new item.
Here an example in youtube.
https://www.youtube.com/watch?v=BuHQSWQHxwk
Once I found a library to do that but I cant find it anymore.
Thank you in advance

There is a library StickyListHeader. You can create view just like shown in the video you mentioned.

Related

Expanding recycler view items

I have gone through other questions as well but couldn't figure out something. I have a well set up RecyclerView.
I m trying this library: https://github.com/AAkira/ExpandableLayout
Now I want the items to be expandable so that they show a TextView which is different for each item.
But I can't figure out how to place itms in XML. Where to place RecyclerView and where the expandable layout? How to setup these things?
Take a look at one of the samples given in the library, it is called 'examplerecyclerview' which I think is the one you need.
These are specific files that you should watch:
RecyclerView Activity and Adapter (Java)
RecyclerView Activity (XML)
RecyclerView List Row (XML)

Android List view row move vertical

I want to create List view row animation like below . I want to move row from one list view to other list view. Both list view are in same activity.
Anyone can give me idea how I can do this.
First of all because you mentioned "ListView":
In my opinion the best way to perform dynamic "lists" in android is to use to android-given class
RecyclerView.
It's easy to use like a normal ListView but like I said before it handles dynamic data.
Moreover it has some support librarys like ItemTouchHelper to drag/drop and swipe items in the list around. Its very easy to expand your RecyclerView with this upgrade. Here is a good tutorial:
Tutorial.
I would like to give you two ideas how I would proceed to implement such a list like the example of your post:
1) (Recommended) Search on Github or similar sites for 3rd library parties that already solved this.
2) Use the RecyclerView with the ItemtouchHelper-Upgrade i mentioned above and try to expand it with two lists. When an item is onMove() set the visibility of the first list on GONE and the second on VISIBLE. Now you only have to add the data of your item to the second list and remove it from the first. Then use notifyDataSetChanged() on both lists and your done.
I dont know how difficult it will be to implement it but thats the only way I know how you can do that and how the programmers of your example could have done it.

How to create ExpandableStickyListHeaders Recycler view android

I want to create sticky header recycler view with ability to expand and collapse sections without on header click i have found this this library
but it uses listview and i want to use Recycler view because i want to use it as a list and Grid at the same time
did any body have made something like this
Thanks in advance
Actually yes, just finished to add this new feature, and it should be also the way you would like. Check my FlexibleAdapter project, but, you should also read my answer here: How can I set a listener inside a RecyclerView Header Decor?

Move in a ListView

In my android application, I've a ListView that is loaded with a lot of items. I would like that users could move very fast through the list. I've seen that in some applications, when a list is loaded, and the user starts scrolling, a icon appears on the right of the screen, and this icon can be used to move very fast through the list.
How can I do this?
Thank you very much!
You want android:fastScrollEnabled="true".
See Vardhan's implementation of Fast Scroll for android here.
If you want to be able to customize your Fast-scroller, like choosing
your own scroller image to appear, I recommend using this source:
https://github.com/nolanlawson/CustomFastScrollViewDemo/
Basically, your listview adapter will have to implement a
sectionindexer. This section indexer can be very stripped if you don't
want to complicate things and provide simple fastscrolling though the
entire length of the list.
The direct source for the fastscroller is here:
https://github.com/nolanlawson/CustomFastScrollViewDemo/blob/master/src/com/nolanlawson/customfastscrollviewdemo/CustomFastScrollView.java
Place this view around your listview (nest your listview inside this
view in your xml layout file) and set android:fastScrollEnabled="true"
on your listview.
You might also want to check out a previous answer:
Fast Scroll display problem with ListAdapter and SectionIndexer
Source : How to use fast scroll in android?

How to create horizontal listview which is fix the count of item when display

I want to create a horizontal listview which contain many item, one item will contain a image. When user slide listview => the count of item will be fix when it display, example display only 3 or 4 image. How can I do that? Many thanks.
Edit:
I use this
to create a HorizontalList view, everything is ok but I don;t know how to make the Next and Previous button work! Any idea?
Instead of a horizontal ListView (which, as far as I know, isn't offered by the Android SDK) you can use a HorizontalScrollView. You can add the items like to any other kind of layout class.
It looks like what you are looking for is a Paginated Gallery. I have written one here.
Its still only a couple of days old but hopefully the included Activity code will get you off the ground.

Categories

Resources