Skip to main content

Questions tagged [android-viewholder]

A ViewHolder object stores each of the component views inside the tag field of the Layout, so you can immediately access them without the need to look them up repeatedly. The ViewHolder pattern is often used in Android applications to improve performances of view access.

android-viewholder
0 votes
0 answers
29 views

How to achieve drag item from one category to another category by using two different recyclerview

How to implement dragging one item from category related stickers to another category when having 2 different recyclerView and different viewHolder. refer below animation I tried to add dragListerner ...
Akshay Kondekar's user avatar
0 votes
0 answers
30 views

How to load youtube video url on my viewholder, from my dummy data

Can someone help me, how to load video on my viewholder ? it is possible or not ? if possible how to load interface DummyMusicDataSource { fun getMusicData(context: Context): List<Music> } ...
ryhanhxx's user avatar
0 votes
2 answers
40 views

How to use object animator for background color of items in RecyclerView?

I have a RecyclerView where some items should have their background color change animatedly from pink to transparent for 6 seconds when they appear on the screen. But the problem is that in addition ...
danial's user avatar
  • 45
0 votes
1 answer
139 views

Why Nested Class is better than Inner Class when I create ViewHolder in RecyclerView

I heard that inner class use more memory than nested class in Kotlin. And somebody said it is bad for using inner Class in RecyclerView(ViewHolder). But, It was hard to use onClickListener without ...
kite's user avatar
  • 11
1 vote
1 answer
70 views

ViewHolder not recognising textview on binding using Kotlin

I am following a tutorial online due to this being my first time programming in kotlin, i just wanted to bind the text that i will get from a table in database to a ViewModel, i started with an ...
sara fernandes's user avatar
0 votes
2 answers
90 views

Make transparent part of the view pass over touches and keep touches on a visible part

There is views container (blue) which is set for the almost full width of the screen. Sometimes views which are displayed inside this container require not to have the full width of the container - ...
bene25's user avatar
  • 588
0 votes
0 answers
38 views

Android Recycler View with Multiple ViewHolders, Drag and Drop, and Persistent Item Positions

I'm working on an Android app where I need to implement a RecyclerView with multiple ViewHolders. These ViewHolders represent different types of items with varying layouts. Additionally, I want to ...
Нурбек Орманали's user avatar
0 votes
0 answers
55 views

NullPointerException on boolean androidx.recyclerview.widget.RecyclerView$ViewHolder.shouldIgnore() when trying to add Chips to a fragment

I want to make a screen where you can filter based on chips. When adding the chips I get the following error: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean androidx....
Jonas Verschueren's user avatar
0 votes
1 answer
28 views

(Kotlin) RecyclerView button change outside ImageView

I have an adapter class that structures a RecyclerView. I want this RecyclerView to have a button that updates an ImageView outside of the RecyclerView. This code updates the images inside the ...
Brandon's user avatar
0 votes
1 answer
86 views

Refactoring RecyclerView with multi ViewHolder from ButterKnife using ViewBinding

Wanting to switch to version 8.0 of AGP for my Android project I had to refactor a lot of java classes where the developer before me used ButterKnife to bind variables to layout elements. The last ...
Lubron's user avatar
  • 97
0 votes
1 answer
505 views

Attempt to invoke virtual method 'boolean android.os.HandlerThread.isAlive()' on a null object reference

I'm working on a document sharing app & when I use 'search' functionality, the app crashes I think there's some issue in PDFViewer(https://i.sstatic.net/qVaEF.png) PDFViewer works on dashboard but ...
Devansh Shah's user avatar
0 votes
1 answer
42 views

Two inner classes within a RecyclerView class to display different layouts

I am trying to declare two inner classes within a RecyclerView class using Kotlin. Currently, when I try this like below, I get an error message on both classes. What do I need to change to make this ...
Captai-N's user avatar
  • 1,392
0 votes
1 answer
39 views

How to Fit Recyler view items according to layout size in Android

I am using recycler to show 8 items in the list. However the number 8 is fixed. I want to resize the items according to the size of the parent layout in which recycler view is given. That means all 8 ...
java bee's user avatar
  • 125
0 votes
1 answer
65 views

Android RecyclerView.Adapter not updating

I've got My RecycletView.Adapter which has a field of Type ArrayList to set my Holder (inner class). If I try to update my Adapter from the Adapter class itself (OtherAdapter in my example) by setting ...
Dario Franzese's user avatar
0 votes
1 answer
23 views

Optimizing code structure for ViewHolder members - Kotlin

I have a ViewHolder that looks something like this: class ViewHolder( itemView: View, var mSettingsRadioButton: RadioButton = itemView.findViewById(...), var mSettingsCheckBox: ...
Phani Teja's user avatar

15 30 50 per page
1
2 3 4 5
71