android-recyclerview

Android: RecyclerView in a ScrollView

让人想犯罪 __ 提交于 2019-12-25 07:58:56
问题 I'm trying to have a RecyclerView inside a ScrollView. My problem is that when i scroll the RecyclerView this is not "smooth": as soon as you release your finger the scrolling stops immediately. My layout in the fragment is: Scrollview LinearLayout TextView RecyclerView Button I tried disabling nested scrolling: mRecyclerView.setNestedScrollingEnabled(false) and wrapping content of mRecyclerView: android:layout_height="wrap_content" obtaining the smooth scrolling i wanted, but in this way the

Image url changing while cliking onRecyclerView item

孤街浪徒 提交于 2019-12-25 07:27:56
问题 private DisplayImageOptions options; @Override public TaskViewHolder onCreateViewHolder(ViewGroup parent, int viewType) { View v = LayoutInflater.from(parent.getContext()).inflate(R.layout.task, parent, false); options = new DisplayImageOptions.Builder() .cacheInMemory(true) .cacheOnDisk(true) .considerExifParams(true) .postProcessor(new BitmapProcessor() { @Override public Bitmap process(Bitmap bitmap) { return Bitmap.createScaledBitmap(bitmap,200,200,false); } }) .build(); TaskViewHolder

RecyclerView items with very large empty space at bottom after updating to support library 23.2.1 [duplicate]

一笑奈何 提交于 2019-12-25 07:05:28
问题 This question already has an answer here : Android Support Library rev 23.2 and RecyclerView (1 answer) Closed 3 years ago . I have updated support library to 23.2.1 and after that recyclerview items are appearing with big empty space. Though I am using recyclerview and it's parent view height as WRAP_CONTENT. My App fetches 10 items data at a time from the server and while scrolling to up it shows a progressbar at the bottom so at that time(while progressbar is showing) recyclerview items

TabbedView similar to Spotify [closed]

梦想的初衷 提交于 2019-12-25 06:28:48
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 3 years ago . I'm making research for UI to my new app, main purpose is displaying products on something like horizontal imageList/tabbedView looking like spotify app. My main problem is how to get displaying "previews" of next and previous product on left and right side of screen. Any hints?

Delete data from firebase recycler view adapter without deleting in the database

折月煮酒 提交于 2019-12-25 05:23:22
问题 That is it, can i remove a view from firebase recycler view adapter, but not deleting in the database?How? final FirebaseRecyclerAdapter<Game,GameViewHolder> firebaseRecyclerAdapter=new FirebaseRecyclerAdapter<Game, GameViewHolder>( Game.class, R.layout.row, GameViewHolder.class, mdatabase ) { @Override protected void populateViewHolder(GameViewHolder viewHolder, Game model, final int position) { viewHolder.setTitle(model.getGame_name()); viewHolder.setJugado(model.getJugado()); viewHolder

RecyclerView Item position does not get update

大兔子大兔子 提交于 2019-12-25 05:09:40
问题 In the following code, I could able to delete the image via clicking imgBtn, but my images does not scroll the deleted image position, it just stays its current position, it does not update. Main Activity Class ItemData itemsData[] = {new ItemData("Help", R.drawable.image), new ItemData("Delete", R.drawable.orange), new ItemData("Cloud", R.drawable.image), new ItemData("Favorite", R.drawable.orange), new ItemData("Like", R.drawable.image), new ItemData("Rating", R.drawable.orange)};

Which is more expensive, notifyDatasetChanged() or looping over a large cursor?

核能气质少年 提交于 2019-12-25 05:05:48
问题 Basically, I have a RecyclerView with an adapter populating the data from a cursor. I have two options to get item animations: Use setHasStableIds(true) and override getItemId to return the ID of the database row, and then use a swapCursor function in the adapter that swaps its current cursor with the new one and then calls notifyDatasetChanged Similar to option 1, but instead of simply swapping the cursor and calling notifyDatasetChanged , iterate over the old and new cursor, comparing the

Which is more expensive, notifyDatasetChanged() or looping over a large cursor?

时光总嘲笑我的痴心妄想 提交于 2019-12-25 05:05:24
问题 Basically, I have a RecyclerView with an adapter populating the data from a cursor. I have two options to get item animations: Use setHasStableIds(true) and override getItemId to return the ID of the database row, and then use a swapCursor function in the adapter that swaps its current cursor with the new one and then calls notifyDatasetChanged Similar to option 1, but instead of simply swapping the cursor and calling notifyDatasetChanged , iterate over the old and new cursor, comparing the

Highlighting rows of CardView in RecyclerView

邮差的信 提交于 2019-12-25 04:43:20
问题 I am following the Big Nerd Ranch tutorial on RecyclerView tutorial on RecyclerView. I changed a few things and there. The problem I am facing is that when I click on the row; that particular gets highlighted but then I cant see the other 'unselected rows'. Before Selection of row: After Selection of row I am implementing my clicks in a holder. Below is the code: public class CustomRecyclerViewHolder extends SwappingHolder implements View.OnClickListener, View.OnLongClickListener { private

Parse RecyclerView Image Query

不想你离开。 提交于 2019-12-25 04:42:41
问题 I am attempting to load images into a recyclerview from the Parse web service. For this I will need: A. A query which retrieves, based on criteria, images by category in the form of a List. Now, I have been able to find ways to do this with ParseObjects, but not ParseFiles such as images. B. A way to extract the images from the List of ParseFiles and to load them into a List of an object which can store these images, even though they do not have a local ID. They must then be loaded into the