staggered-gridview

RecyclerView, StaggeredGridLayoutManager Refresh Bug

核能气质少年 提交于 2021-02-18 04:50:34
问题 I used support library v7-21 and the RecyclerView isn't showing correctly. GridLayoutManager and LinearLayoutManager is Ok. Problem only occurs when in StaggeredGridLayoutManager I Load my DataSet and then refresh the data. Data refresh is working fine but the RecyclerView 's view exist out of the screen. does anyone knows how to fix it? 回答1: Updated 2015-01-04 (at bottom) I have an example project to demonstrate this at https://github.com/dbleicher/recyclerview-grid-quickreturn . But here

RecyclerView with various elements in the same line

时光怂恿深爱的人放手 提交于 2021-01-27 19:33:36
问题 I would like to make a RecyclerView having differents elements per line depending on a boolean in the adapter. In my app, you have some banknote and coins. I have to put all in a RecyclerView . First of all I want to show the banknote (2 per 2) and after the coins (4 per 4) like this : This is how I want the result look like : This is my Adapter class MoneyAdapter(private val money_list: ArrayList<Money>) : RecyclerView.Adapter<MoneyAdapter.ViewHolder>() { override fun onCreateViewHolder

StaggeredGridLayoutManager: Adding Margin makes the layout items pushed to the side

眉间皱痕 提交于 2020-08-20 11:46:05
问题 So, I'm working on a small project and I wanted to add StaggeredGridLayoutManager to the file. While it works if I don't add an itemDecorator and no margin or padding in my layouts. As soon as I add margins it pushes the list to one side. I'm attaching a screenshot to clarify the issue. Here is my Code: recyclerView.setHasFixedSize(true); StaggeredGridLayoutManager gridLayoutManager = new StaggeredGridLayoutManager(2, StaggeredGridLayoutManager.VERTICAL); recyclerView.addItemDecoration(new

Use Etsy's StaggeredGridView in Eclipse

点点圈 提交于 2020-01-06 08:31:51
问题 I wanted to use Etsy's StaggeredGridView in a project of mine on Eclipse. Their gitHub page doesn't provide instructions to import/setup their project in Eclipse. If anyone has successfully done this and can share the steps, it would help a lot! https://github.com/etsy/AndroidStaggeredGrid I tried following the steps listed in the link below, but it didn't work. Importing gradle project to eclipse 回答1: An easy way is to download the ZIP file, extract the entire file to a temp directory,

How to reflow items in a RecyclerView with the StaggeredGridLayoutManager

北城以北 提交于 2019-12-30 10:35:14
问题 I'm playing around with the StaggeredGridLayoutManager and have something close to what I want. I have a horizontal staggered grid with 2 rows, where some items are the height of 1 row, and others span both rows. I want the single row height items to stack up and I thought that could be achieved by setting the gap strategy to GAP_HANDLING_MOVE_ITEMS_BETWEEN_SPANS, but this does not appear to work. Current: ___ ___ ___ ___ |___| | | |___| | | | | | | |___| |___| What I want: ___ ___ ___ |___|

No good example about RecyclerView and StaggeredGridLayoutManager in Android Docs

谁说胖子不能爱 提交于 2019-12-27 17:03:45
问题 I couldn't find any better example for using RecyclerView with StaggeredGridLayoutManager . Not even in Android Docs. Q1. I need some examples which can give proper explanation about how to use RecyclerView with StaggeredGridLayoutManager . Q2. Can anyone tell me if it is possible to create following layout using RecyclerView with StaggeredGridLayoutManager So far i have found this link which is not at all useful. I also found this link for cardslib but it is too much complex in

No good example about RecyclerView and StaggeredGridLayoutManager in Android Docs

佐手、 提交于 2019-12-27 17:03:35
问题 I couldn't find any better example for using RecyclerView with StaggeredGridLayoutManager . Not even in Android Docs. Q1. I need some examples which can give proper explanation about how to use RecyclerView with StaggeredGridLayoutManager . Q2. Can anyone tell me if it is possible to create following layout using RecyclerView with StaggeredGridLayoutManager So far i have found this link which is not at all useful. I also found this link for cardslib but it is too much complex in

Using Etsy Android Staggered gridview

混江龙づ霸主 提交于 2019-12-25 04:24:39
问题 Iam using https://github.com/etsy/AndroidStaggeredGrid to achieve a StaggeredGridView for my app. I get a NullPointerException when I try to initialize my DynamicHeightImageView. I cant figure out what is going wrong. Here is my code:- row_staggered.xml <com.etsy.android.grid.util.DynamicHeightImageView android:id="@+id/imgViewDynamic" android:layout_width="match_parent" android:layout_height="match_parent" android:scaleType="centerCrop" /> StaggeredAdapter.java static class LazyViewHolder {

How to find cell width from StaggeredGridLayoutManager?

℡╲_俬逩灬. 提交于 2019-12-21 17:17:12
问题 I have a StaggeredGrid in a RecyclerView and I am trying to dynamically set the image height in the onBindViewHolder . I thought the StaggeredGrid was supposed to handle all this automatically, so I set android:layout_width="match_parent and android:scaleType="fitStart on the ImageView , but there is lots of gaps around the image. Since the StaggeredGrid isn't living up to it, I'm trying to help it a bit by defining the image height dynamically in the onBindViewHolder . I have the width and

Windows phone 8.1 Implement virtualization for Custom variable sized Gridview

为君一笑 提交于 2019-12-18 09:38:52
问题 I have implemented custom itempanel for gridview to support variable item height using this link posted by JerryNixon.My Custom panel supports 3 different sized template(depending on image dimension I am deciding which template to use).This custom Gridview should have pagination and it should support more than 200 items. Right now i could load only 50 items and it crashes because of out of memory exception event in 1GB device . Its one of the requirement in out project. I know when we