Questions tagged [android-recyclerview]

The RecyclerView widget is a more advanced and flexible version of ListView and GridView.

Filter by
Sorted by
Tagged with
0
votes
0answers
12 views

setLayoutManager in kotlin

How can I define the layoutmanager for RecycleView using kotlin? The code below does not suggest errors, but it is not executing the mentioned part. class MainActivity : AppCompatActivity() { ...
0
votes
0answers
9 views

Grid Recycler View with headers - Transparent divider decoration with equal space between items

I have a recycler view with a grid layout that has headers that occupy the full length of a row. gridLayoutManager.spanSizeLookup = object : GridLayoutManager.SpanSizeLookup() { override ...
0
votes
0answers
6 views

Load More RecyclerView and Bottom ProgressBar with firebase-ui pagination android

I am developing an android app that uses recycler view firestorepagingadapter, I want to ask: is there a way to show Bottom ProgressBar when Loading More? if someone knows any idea please don't scrimp ...
1
vote
1answer
23 views

Open ViewPager2 to particular position without scrolling

I have implemented a recyclerview with some videos (say 10). Clicking on any item opens a viewpager2 which is on some other activity with all the items and the clicked one (from recyclerview) is shown....
1
vote
0answers
17 views

Android EditText AND SearchView : What are the main differences (except the design)?

I need to implement a search interface in my Android app that would filter several RecyclerView inside a ViewPager. I have already implemented both EditText and SearchView widgets and try to see ...
0
votes
0answers
11 views

Set Focus on the last item of a recyclerView

Set Focus on the last item of a recyclerView (total column = 5 , row = dynamic based on number of items (1,2,3,4,5)) when I am already on the last row , which has for example 4 items;
1
vote
1answer
34 views

Kotlin : How to click on item in a Recyclerview Inside another Recyclerview

After seen all the similiar questions, I don't find a solution of my problem, which the description as follows: In my android app, I use Kotlin as language. In my app, I have a lot of category and ...
1
vote
0answers
12 views

Horizontal scrolling layout manager for recycler view with multiple rows

I am trying to achieve a horizontally scrollable recyclerview layout manager which I can be able to have multiple rows where the first item can occupy the whole spans: So if the number of rows is 3 ...
0
votes
1answer
20 views

How to convert Firebase Old Adapter method to New Adapter method?

In the main Screen of my app I was trying to build a Search View with Edit Text. I have made a recycler view below the search view. My app is a music app. So I want to build a function like when user ...
0
votes
0answers
7 views

Displaying Coverart (from id3) in Recyclerview in background

I am working on an app that uses a Recyclerview to display mp3 files, providing its cover art image along with other info. It works but is slow once it starts dealing with a dozen or more cover arts ...
0
votes
1answer
34 views

How do I get the position of the item shown in my recyclerview from outside of the adapter?

I have a RecyclerView with a fixed number of items. I've implemented a SnapHelper to ensure that only one CardView item is visible at a time. How can I get the CardView position from outside of the ...
0
votes
3answers
42 views

not working scrollToPosition recyclerview in android

adapter = new AdapterAaaa(aaaaaa.this, model); RecyclerView.LayoutManager manager = new LinearLayoutManager(aaaaaa.this); rec_aaa.setItemAnimator(new DefaultItemAnimator()); rec_aaa....
0
votes
0answers
33 views

How to scroll to and focus an EditText inside a view in RecyclerView?

Each item in my RecyclerView contains several views including an EditText. In response to user action, I want to scroll to a specific position in RecyclerView and focus the corresponding EditText. I ...
0
votes
0answers
42 views

RecyclerView.Adapter ClassCastException when scrolling a lot

I am building a chat app, where i am using a RecyclerView with an adapter and it is using different viewholders, because the server sends Rich Content which require different views graphs etc. When i ...
0
votes
0answers
55 views

RecyclerView Adapter error after deleting item from ArrayList

I have 2 RecyclerView Adapter named AddDrinkAdapter and DrinkDetailAdapter. AddDrinkAdapter is to list different types of drinks and the desired quantity. While DrinkDetailAdapter is to list those ...
0
votes
3answers
39 views

How To Display Images with FirebaseUI Firestore RecyclerView

I would like to display an image in my recycler view using FirebaseUI and Firestore. So far i can only display text. I have not been able to find a understandable solution online. As you can see in ...
-1
votes
4answers
36 views

How to call a custom dialog fragment from a RecyclerViewAdapter inside a fragment in Android

I am trying to call a custom dialog fragment i have created from a dialog fragment adapter that extends a recyclerView. I'm using the latest android studio with androidx. the following code is for the ...
1
vote
1answer
39 views

add admob native ad in a recyclereview

I am trying to ad the admob's native ad in a recyclerview fragment, which is displayed inside a viewpager. My fragment looks like: public class SunFragment extends Fragment { public static final ...
0
votes
0answers
32 views

Recyclerview scroll goes up (Top) automatically in paging in dynamic data

I am fetching data from local server in my recyclerView using paging style i.e fetch next page after it completed first page items. I went so far but i encountered a problem of auto scroll to top ...
0
votes
1answer
21 views

Recyclerview Item onclick overlays the next fragment instead of replacing it

I have these activity, fragments, its viewmodels, and their adapter. I can already call the next fragment on click of a recyclerview item, but the new fragment overlays on the first fragment. Refer ...
0
votes
1answer
33 views

How to save RecyclerView's scroll position ? when app closed

how i can save my last position in RecyclerView adapter after app closed and restore it after return to app RecyclerList.add(m); messageAdapter = new MessageAdapter(context, RecyclerList, ...
0
votes
0answers
13 views

RecyclerView IndexOutOfBoundsException on delete record from database,when delete a record from database

Hello I'm creating a simple app with recyclerView. Looks "Reminder". In this code if i first scrolling down everythink is good - no exceptions, but if i scrolling again no... This method going to ...
0
votes
1answer
31 views

How to Open a “Details” Fragment onclick of Recyclerview

I have this fragment, its viewmodel, and its adapter. It can already listen to a click, but all I know to do on this is to show a toast. I want it to go to another fragment which will show its "...
3
votes
2answers
46 views

Selecting one from radio group value and scrolling down and some item selected automatically in Recycler View( beginner)

I am making an attendance system where I take the attendance using RadioGroup with two options. When I select some radio button and scroll down some other radio button gets auto-selected. If I change ...
0
votes
1answer
27 views

Scrolling RecyclerView according to another RecyclerView item position

I have an horizontal recyclerView (Category Recyclerview) at the top of the screen that contains Titles, below it there is another vertical recyclerView (Category Items) that contains Titles and sub ...
0
votes
1answer
21 views

How to add a onItemclicklistener method to recycleview of buttons

I want to make a onItemclicklistener method to recycleview of buttons and every button intent to Activity but the Activity has Textview (every button has different Textview ) public class RecAdapter ...
0
votes
1answer
29 views

How to parse JSON date format inside a RecyclerView onbindViewHolder in android studio? [duplicate]

I have looked everywhere but I couldn't find anything about parsing a date time json object inside RecyclerView onbindViewHolder in android. How to do it inside a recycler view adapter? Im new in ...
0
votes
0answers
10 views

How to highlight text in RecyclerView? (or multiple line?)

How to highlight the searched text in android? I am trying to figure out how to highlight the selected item. I found many posts regarding Spannable TextView, but not sure how to implement. Appreciate ...
1
vote
1answer
22 views

recyclerview only changes 1 icon (favorite icon) while the data is more than 1

I'm trying to load "favorite" data in a local database (sqlite) and display it in an icon in recyclerview override fun onBindViewHolder(holder: MyViewHolder, position: Int) { val view = holder....
-1
votes
0answers
15 views

motion layout with recyclerview animation problem

Im using recyclerview with motion layout to anitmate the header i got two fragments the main one the recyclerview and the detail fragment when ever i navigate to the detail fragment and go back to ...
0
votes
1answer
27 views

java.lang.NullPointerException: Attempt to invoke virtual method 'RecyclerView$ViewHolder.shouldIgnore()' on a null object reference

I am trying to implement a recyclerview holder for adding and removing cards dynamically. But why am getting null a pointer exception while trying to add cardview to the recyclerview dynamically? ...
-1
votes
0answers
14 views

I created a Book app with navigation drawer Activity but there is a problem fragments selecting

I wanna create a book app by RecyclerView with Navigation Drawer Activity, and I created but there is a problem with navigation items click, these are working but not changing the layout of fragments(...
0
votes
0answers
15 views

CallbackStill running to Adding Model, but RecyclerView already Created - AndroidX

I have AllInstalledApp function to get all Installed App and inside it, I set a callback for Checking Updated app it takes 1-2 seconds to complete. And the callback has "For" function on it so the "...
0
votes
0answers
17 views

How is the method of notify a recycler view in a Fragment from a detail activity?

The structure of my project is the following: Main activity with a nav drawer in which I choose the News fragment, this is a viewpager really, with two fragments inside, news with a recycler view ...
0
votes
0answers
4 views

Recycler View Item Decoration does not get focus and Talkback does not announce it

I am using Custom Recycler View Item Decoration. When I switch on TalkBack, all the Recycler View items get focus and Talkback announces it but View Item decorators do not get focus and Talkback does ...
1
vote
2answers
27 views

Android Recycler View problem in “onBindViewHolder” function “static method cannot be called from non-static method”

I am new to android and java. I am not able to call ViewHolder.setCategoryName(name); in the onBindViewHolder function. I know there are probably similar questions but nothing has worked for me yet. ...
0
votes
0answers
12 views

Recyclerview - viewholders with audio players

I'm developing a chat app and I'm struggling to find a way to implement a recyclerview with audio. The idea is that each viewholder has a audio player UI, like whatsapp and telegram has, and ...
0
votes
0answers
9 views

Updating StaggeredGridLayoutManager span count AFTER recycler view items have been bound

So I have a recycler view with an horizontal StaggeredGridLayoutManager. The recycler view is initialized on application start but is not visible until you press on a button, so the items are not ...
2
votes
0answers
28 views

Recycler view inside fragment into viewpager not working properly

I have a CoordinatorLayout which have a viewpager inside it and the layout has a recylcer view inside the collapsing toolbar. I have loaded two fragments by the viewpager and both fragment has ...
0
votes
0answers
52 views

Rare error on a Fragment with a RecyclerView

I do not know how to explain this. My app overnight has stopped "working." It consists of a RecyclerView with several items and a search bar at the top. All this within a fragment belonging to an ...
0
votes
0answers
33 views

How to create Nested ListViews with two different arrays in android?

Pleas see my output So inside that image I am able to select two options from two arrays but I want only one item should be selected from those two arrays. so how could i do this Actually right now, ...
1
vote
1answer
31 views

Bottomsheet shows over RecyclerView - How to make sure clicked item is shown in RecyclerView

Im using a CoordinatorLayout with an RecyclerView and hidden BottomSheet. When the User clicks/selects an Item in the RecyclerView the BottomSheet gets expanded, often it hides the clicked item of the ...
0
votes
0answers
29 views

How to set multiple view type in recyclerview and show imageview, textview and exoplayer

How can I show exoplayer,imageview and textview, as well as video play when it's on focus; and stop when the focus went away? I'm using exoplayer and create 3 different item view types. I want it like ...
2
votes
0answers
26 views

Unable to display MapView in LiteMode inside RecyclerView

I have a list of saved locations coming from the server that I want to display inside a RecyclerView with a map snapshot of the location. I coded it according to code samples provided for the same by ...
0
votes
1answer
29 views

recyclerview uitest using espresso , is it bug?

my goal is testing RecyclerView scrolling. When I execute example codes, this error occurs: E/TestRunner: androidx.test.espresso.PerformException: Error performing 'scroll RecyclerView to position: ...
1
vote
5answers
52 views

How to change visibility of the buttons in the others items in Recyclerview?

I have recyclerview with the buttons inside of items. When I click one button in one of them I want to hide buttons in others items. I know how to do it in same item where I clicked button, but I no ...
1
vote
0answers
19 views

How to extend RecyclerView to allow “merging” of items?

I'm trying to implement "merging" of items using RecyclerView. We have a a list of cards that you can scroll through, edit, and reorder. We also have the concept of "stacks" where you can combine ...
-1
votes
1answer
30 views

Kotlin - onclicklistener for recyclerview to a “details” fragment

I'm trying to show another fragment upon clicking a recyclerview item. I already added an onclicklistener, now there's a todo part on the fragment.kt, which I need to know how to have it navigate to a ...
0
votes
2answers
57 views

SharedPreferences inside of a RecyclerView [duplicate]

I have created an activity in which I implemented a recycler view adapter. I have also created a second activity which should add a value into a SharedPreferences. After that, I want to change the ...
0
votes
0answers
27 views

Problem In Loading Next Item After Clicking Next Button In Recycler VIew

I have an Activity which was known as ArtistActivity which contains a RecylerView. In the Recycler View of ArtistActivity, I am loading Songs List like I am loading Song Url and Song Name from my ...