Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Filter by
Sorted by
Tagged with
0 votes
1 answer
34 views

How to convert recyclerview items along with other layout data to bitmap

when capturing the layout to a Bitmap, the non-RecyclerView parts of my layout appear correctly, but the RecyclerView content is missing, How can I correctly convert a layout containing a RecyclerView ...
Sathishkumar G's user avatar
1 vote
0 answers
36 views

Android (Java) usinf RecyclerView: 'ViewHolder' cannot be safely cast to 'RowViewHolder'?

Using AndroidStudio I had asked Google's Gemini to convert me a piece of code of my Android Java application from using a ScrollView to using a RecyclerView instead for more efficient scrolling ...
mmo's user avatar
  • 4,386
0 votes
1 answer
66 views

RecyclerView Item move animation and strange behavior of on item click

I created a simple RecyclerView in Java and implemented item click handling in the adapter's onBindViewHolder method with this action that the clicked item moves to position 0. @Override public void ...
C.F.G's user avatar
  • 1,523
0 votes
2 answers
89 views

IndexOutOfBoundsException when scrolling to end of RecyclerView

I'm new to Android development and have tried to implement a SearchView alongside a RecyclerView to display and filter restaurants. However, when I scroll down to the bottom of the listed restaurants, ...
999's user avatar
  • 11
2 votes
0 answers
379 views

Recycler view does not update until scrolled when using DiffUtil and submitList() with a reversed Array List

I have an array list of log entries, which consists of an a time and date with a description. I want the user to be able to reverse the direction from oldest to newest and back again. I am using ...
Notsileous's user avatar
1 vote
0 answers
37 views

Android Kotlin DiffUtil.ItemCallback seems to have a blind spot

In my RecyclerView, I used ListAdapter combined with DiffUtil.ItemCallback. class CustomDiffCallback : DiffUtil.ItemCallback<TypeInterface>() { override fun areItemsTheSame(p0: TypeInterface,...
IChung's user avatar
  • 479
0 votes
1 answer
58 views

Initialization of recycler view using rootViewContext

fun RecyclerView.applyHorizontalDecoration(context: Context, spacing: Int){ with(this){ Log.i("sachin", "$context,,,,,,,, ${rootView.context}") ...
Sachin Mewada's user avatar
0 votes
1 answer
68 views

onBindViewHolder in Android recylerview is not called when update is triggered via setOnCompletionListener

I have been having a problem since quite some time and I have tried many things to understand and get rid of it without any success. Actually I am developing a music app with different songs that can ...
VanessaF's user avatar
  • 717
0 votes
0 answers
62 views

RecyclerView IndexOutOfBoundsException with Paging3 and Selection Library (tryGetViewHolderForPositionByDeadline)

I am developing an Android app in Java that displays a grid of Japanese Kanji characters using RecyclerView with a GridLayoutManager. I'm using the Android Jetpack Paging3 library to load data from a ...
Tennis Heal's user avatar
0 votes
0 answers
51 views

ItemTouchHelper drag gesture releases after moving one item in RecyclerView with ListAdapter

I'm implementing drag-and-drop functionality in a RecyclerView using ItemTouchHelper and a ListAdapter. Swiping items works perfectly, but I'm facing a strange issue with dragging. The Problem When I ...
user23759128's user avatar
1 vote
0 answers
37 views

Why doesn't the copy/paste context menu appear when I long-press on text inside a RecyclerView item?

During the recycling and reuse process of RecyclerView (items/views).​​Why doesn't the copy/paste context menu appear when I long-press on text inside a RecyclerView item? If I use holder....
Pzzzzz's user avatar
  • 11
1 vote
1 answer
90 views

Android Studio Recycler View Adapter Holder Reference

So what I'm trying to achieve is the following: I have a list of items in the recycler view (upto) 24 line items in the recycler. In one list view item there will be a left and right item that a user ...
Learn2Code's user avatar
  • 2,320
0 votes
1 answer
42 views

Android Adapter not always updating data

Hello I am having trouble with a problem where on my recycler view it displays sometimes the associated items given in the view. I had this problem earlier and what seem to make it work for the first ...
BenTheLittleDucky's user avatar
0 votes
0 answers
36 views

Android doOnLayout in recyclerView views

So this question is regarding the use of doOnLayout and the undesired effect it has when the view that is using it is being recycled. So far I have been using this function to perform an action when ...
Leandro Ocampo's user avatar
1 vote
1 answer
86 views

Android Complex UI : Initial Creation Takes ~100ms — Is This Expected or Can It Be Optimized?

I’m working on an Android app that uses a RecyclerView with a custom Adapter and ViewHolder. The RecyclerView contains EditText views, and the properties of these views (such as text, color, padding, ...
Rohan Pande's user avatar
1 vote
0 answers
60 views

Customize items in GridLayoutManager with SpanSizeLookup

I want to configure a RecyclerView with a different arrangement, as described in the image below, using my Java code: All the items are different item types (e.g., FirstItem, SecondItem, and ...
Guilherme Hepfener's user avatar
0 votes
1 answer
34 views

Why does RecyclerView.canScrollVertically occasionally throw "Attempt to invoke virtual method ...View.getLayoutParams()' on a null object reference"?

Layout: <RelativeLayout android:id="@+id/relativeLayoutMain" android:layout_width="fill_parent" android:layout_height="0dp" android:layout_weight="...
Hong's user avatar
  • 18.7k
1 vote
1 answer
57 views

How to adapt a 320x800dp design for a 411x731dp Android device screen?

I have a Figma design with a frame size of 320dp width × 800dp height that I want to implement in my Android app using XML layouts. However, my target device screen size is 411dp width × 731dp height. ...
Karthick Raja's user avatar
0 votes
0 answers
53 views

How to prefetch and cache RecyclerView items BEFORE they're visible

I have a RecyclerView that displays 100 videos in a vertically scrolling list. Each item in the list is a webview of the JWPlayer showing the thumbnail of the video. My list displayed 2 items in the ...
szaske's user avatar
  • 2,047
0 votes
0 answers
169 views

How to Fix Pull-to-Refresh Not Triggering in Jetpack Compose’s PullToRefreshBox When Wrapping a RecyclerView?

I’m trying to implement pull-to-refresh in a legacy Android project that uses a RecyclerView with an existing Adapter. To leverage Material 3’s modern LoadingIndicator (via PullToRefreshBox), I ...
Aritx Zhou's user avatar
0 votes
0 answers
38 views

EditText in RecyclerView only allows one character input at a time

The EditText input is limited correctly to 7 characters using InputFilter.LengthFilter(7), and that part works as expected. However, I'm having a strange issue: when I type into the EditText inside a ...
Fiqih Hasroni's user avatar
0 votes
1 answer
59 views

How to update data in a RecyclerView using LiveData and a SearchView

I have a Room database (with dao), a Repository, a ViewModel a RecyclerView and an Adapter interacting with each other. Right now the RecyclerView just displays all the item in my ReferenceItem table. ...
Francky380's user avatar
0 votes
2 answers
51 views

Cannot move TextView that is constraint to RecyclerView when RecyclerView items are dissapearing

I have 2 recycler views and one text view. What I am trying to do is when I click from top recyclerview(recyclerViewNotClickedItems) the items, they will disappear and they will appear in the bottom ...
Alex's user avatar
  • 1,976
0 votes
0 answers
27 views

How to handle recyclerview delete, undo and permanently delete items

I have the method in my NoteActivity class and the NoteAdapter class. I'm facing some issues. I'm getting "java lang null pointer exception" attempt to invoke interface method NoteAdapter$...
sibunuel's user avatar
1 vote
0 answers
36 views

RecyclerView bitmap generation - stop Progressbar animation

I use this example to generate pdf file from recyclerview. I call the getScreenshotFromRecyclerView function inside doInBackground of an AsyncTask and the bitmap is generated successfully. The problem ...
len's user avatar
  • 406
0 votes
2 answers
53 views

How do you fix this weird behaviour with RecyclerView and GridLayoutManager?

I have a simple app using RecyclerView with GridLayoutManager. When the app starts, it looks like this: If I tap on 6, 12, 18 & 24 it looks like this: But if I now tap on 6 to unselect it, it ...
Shaun Ross's user avatar
-1 votes
1 answer
54 views

How can i check the button state in recyclerview?

I'm currently working on an app. There are three fragments. One is the home page fragment where there's a list of some popular locations of the world listed in a RecyclerView. And the other one is the ...
eliftekin's user avatar
0 votes
1 answer
47 views

Why does a recycler implemented into a fragment return "No adapter attached; skipping layout" when logging suggests otherwise?

I am trying to implement a custom calendar so I am using a recycler view. I have my main activity that I have programmed a navbar with to switch between fragments. This is set up using a nav graph. ...
Euan Hall's user avatar
0 votes
0 answers
45 views

Show and hide notification red dot when the alarm is triggered in android

I have an item list in recylerview, whenever an alarm is triggered for an item, I want that item to have red dot on its corner to let the user know that they need to take some action. I have tried a ...
M Baig's user avatar
  • 219
3 votes
3 answers
162 views

Weird issue with RecyclerView layout manager is still processing its child views after the view has been removed

I'm experimenting with functionality involving a screen that has a RecyclerView positioned at the bottom. XML: <?xml version="1.0" encoding="utf-8"?> <RelativeLayout ...
Sirop4ik's user avatar
  • 5,233
1 vote
1 answer
87 views

RecyclerView retains old data in ViewHolder when new items miss some attributes – how to properly reset?

I have a RecyclerView where each item can have dynamic attributes (e.g., some items have distance and difficulty, while others only have distance). When a ViewHolder is reused, old attribute values ...
Alexander Zhurkin's user avatar
0 votes
0 answers
36 views

How to make CarUiContentListItem (in CarUiRecyclerView) selectable?

I am implementing a CarUiRecyclerView with CarUiContentListItem in a com.android.car.settings.common.BaseFragment. Here is my layout xml of the fragment. <LinearLayout xmlns:android="http://...
user318245's user avatar
0 votes
0 answers
28 views

Android ConcatAdapter: disable scrolling of header adapter view

Trying to add custom static header to RecyclerView. ConcatAdapter looks good, but is it possible to freeze the header view at the top of list? Thanks.
Konstantin Konopko's user avatar
0 votes
3 answers
74 views

Android RecyclerView to show video slider

I want to show videoes in recycler view, the problem is when I swap from the first video and back to the first, the first video reloads again, I want to make all videoes loaded at once and when I swap ...
user avatar
0 votes
0 answers
18 views

Animation measure() function is not calculating full height issue

The measure() function is not calculating the correct height on the first click, which is causing the full height issue. The RecyclerView is getting an incorrect height on the first click, but after ...
Prince's user avatar
  • 1
0 votes
0 answers
79 views

How can we save data on runtime in Adapter Class?

I am facing some issues in saving data on my runtime(temporary saving) in my adapter class of my bottomsheet for an invoice acknowledgement. Here is one photo explaining all the flow : Also I have ...
Sati Anshul's user avatar
1 vote
1 answer
22 views

RecycleView with Swipe Gestures: Content is not Returning to its Original Position when I Interact with Another Item

As the title suggests, I'm trying to make a RecyclerView that reveals a button when swiped to the left, while making it so that the content will remain visible when it is swiped. I managed to do so by ...
Lock's user avatar
  • 21
0 votes
0 answers
27 views

Compose LazyRow crash with "Horizontally scrollable component was measured with an inifinty maximum width constraints" [duplicate]

I have an android recycler view inside which I am adding my compose view which will contain the LazyRow of items. This is working correctly with portrait but in case of landscape it is crashing with &...
Shubham Hupare's user avatar
0 votes
0 answers
15 views

How to "persist" data/view while scrolling RecyclerView

I'm implementing an Excel-like table with RecyclerView like this: The RecyclerView is wrapped with a ScrollView, because the requirement is only the RecyclerView is scrollable, not the entire ...
anta40's user avatar
  • 6,813
0 votes
0 answers
63 views

Can't get initialPrefetchItemCount to work, or how can I optimize scrolling in RecyclerView?

I have a RecyclerView with a complex layout. It's a vertical list where each item contains a nested RecyclerView with a GridLayoutManager. The inner list can have up to 40 items. Additionally, the ...
sunakulto's user avatar
0 votes
0 answers
41 views

Android recyclerview requestFocus when scrolling up and down for edittext items only

I have recyclerview consisting of edittexts only. Those edittexts have various length. I want to stop scrolling my recyclerview on onViewAttachedToWindow when holder.getAdapterPosition() == vhIndex. ...
Jawegiel's user avatar
  • 131
0 votes
0 answers
32 views

Keeping multiple RecyclerViews in alignment

I'm making an app meant to be navigated with a tv remote (Up, down, left, right, etc...). I have several horizontal recycler views stacked on top of each other which can be properly navigated with ...
Kilometer Bob's user avatar
0 votes
1 answer
105 views

firebase database user submitted posts retrieve to android recycler view in date wise

This is my HomeView Fragment Activity public class HomeView extends Fragment { private View view; private RecyclerView recentPosts; private DatabaseReference donor_ref; FirebaseAuth mAuth; private ...
Safiyulla Mona's user avatar
0 votes
0 answers
55 views

RecyclerView inside BottomSheet does not scroll

I have to takeover an old projet with a big issue. The app contains BottomSheet displaying a huge list of elements. Previously, that BottomSheet contained a NestedScrollView containing itself the ...
T K's user avatar
  • 41
0 votes
0 answers
18 views

How to Exclude Plugin Apps from System Apps in Android PackageManager?

I'm developing an Android app that categorizes installed applications into system apps and user apps using PackageManager. My current filtering logic for system apps is: PackageManager packageManager =...
Aditya Soni's user avatar
0 votes
0 answers
22 views

Groupie library: classes cannot be resolved

As illustrated in the subject,Item , ExpandableItem, ExpandableGroup, and GroupieViewHolder classes cannot be resolved. My project is in Kotlin and here's my gradle: My project settings: ...
Yasmine Raafat's user avatar
0 votes
1 answer
48 views

Activity with RecyclerView not calling OnCreate

I am trying to build a list with a recycler view. I created the recycler view, an adapter and set the adapter with default values in OnCreate and then later in that function I call a firebase async ...
Ron Jones Jr's user avatar
0 votes
0 answers
68 views

How to create curved recyclerView

How to create curved like this in recyclerView. When selecting an item in the recyclerView, the background of the recyclerView will be raised a small part like this Is there a repo or solution for ...
Nguyễn Mạnh Cường's user avatar
0 votes
1 answer
53 views

RecyclerView Adapter onCreateViewHolder ReInvocation Issue Despite Single Item in List

Problem Statement : I'm facing an issue where the onCreateViewHolder method in my RecyclerView.Adapter is being called multiple times, even though there is only one item in the list. This is ...
Akshat Singhal's user avatar
0 votes
0 answers
71 views

Inconsistent BottomSheetBehavior: BottomSheet jumps and RecyclerView fails to resize on some devices

I'm experiencing inconsistent behavior with Android's BottomSheetBehavior on some devices. My app layout contains a CoordinatorLayout with an AppBarLayout, a main RecyclerView, and an included ...
NiceToMytyuk's user avatar
  • 4,487

1
2 3 4 5
593