Category : android-recyclerview

I’m just wondering on how to make a recyclerview that display locked items and clicked item (Completed items). It is about making a step by step progress and course flow. When the user click on recyclerview item, it will display a green tick (marked as completed) It will lock the items (next topic) preventing the ..

Read more

I’m facing a problem with a very long spannblestring, which is generated from HTML content, not appearing in Viewholder of Recyclerview. Pleases check the code and screenshots below: val spanned = HtmlCompat.fromHtml(formattedHtml, HtmlCompat.FROM_HTML_MODE_LEGACY) txtContent.setText(spanned, TextView.BufferType.SPANNABLE) This is a screenshot of long HTML (which is showing blank) from this file This is how short HTML display ..

Read more

I am trying to observe MutableLiveData and refresh the RecycleView, but it doesn’t work. This is my fragment code: class NowyZestaw : Fragment() { val setEditModeViewModel: SetEditModeViewModel by activityViewModels() @VisibleForTesting(otherwise = VisibleForTesting.PRIVATE) val bazaModel: BazaModel by activityViewModels() override fun onCreateView( inflater: LayoutInflater, container: ViewGroup?, savedInstanceState: Bundle? ): View? { val root = inflater.inflate(R.layout.nowy_zestaw, container, false) ..

Read more

I want to open new activity for every item like for example if user clicks on the first item it should open an activity that shows an image but if user clicks on second item it should show images and texts. Please guide me with this as i am new to Android Studio. Thanks This ..

Read more

I need so that if one clicks the menu item "turn All Words On" (look below), then the view scrolls to the top position. How to do this from the onOptionItemSelected() method and what to type there? Appreciate any help. @AndroidEntryPoint class VocabularyFragment : Fragment(R.layout.recycler_layout), VocabularyAdapter.OnVocItemClickListener { private val viewModel: VocabularyViewModel by viewModels() private lateinit ..

Read more

I want to use these animations to animate the items of RecyclerView: https://github.com/wasabeef/recyclerview-animators I have done everything that was required. However when I apply them nothing happens. What could be the problem? I have included it in dependencies: dependencies { implementation ‘jp.wasabeef:recyclerview-animators:4.0.2’ } And added to repositories: // Top-level build file where you can add ..

Read more

I think I have a simple problem, but since I am a beginner, I dont know how to solve it. I have a simple list in a recyclerview and an itemtouchhelper attached to the items of the list. The recyclerview shows a Textview inside a scrollview thats inside a constraint layout. So everything works fine, ..

Read more

I have bottom sheet view and recycler view in it. It’s written in Kotlin. I’m trying to show the list of comments. I get null pointer exception when trying to show the bottom sheet and apply recycler view data. My error is – Attempt to invoke virtual method ‘void androidx.recyclerview.widget.RecyclerView.setAdapter(androidx.recyclerview.widget.RecyclerView$Adapter)’ on a null object reference. ..

Read more