• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Recyclerview click is slow

 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So I have a recyclerview in a fragment with child view consisting of some textviews inside a card view and I'm going to make a fragment transaction with bundles when the recyclerview gets clicked ,But the problem is the click response is so slow,it takes up to a second or two to complete the transaction ,and i have used in a thread too,but the problem persists .You can find the complete code below..Thanks...

Recyclerview Child view



Java --Click Listener



and the fragment that is going to be created ,usually populates some textview and imageviews by the data from bundle and not much of a code here.

 
Saloon Keeper
Posts: 7589
177
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Which line(s) of code are slow, specifically?
 
dev goku
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Tim Moores wrote:Which line(s) of code are slow, specifically?



The fragment transition is slow, so I think the transaction codes are slow.. What do you think?
 
Tim Moores
Saloon Keeper
Posts: 7589
177
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We don't have enough information yet to make guesses. If you haven't done so yet, perform timings of each line of code to see which one takes a long time.
 
dev goku
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The click response is slow on the first click,but its good on further clicks and the fragment is added quickly.

perform timings of each line of code to see which one takes a long time.



How do i do it though ?
 
There were millions of the little blood suckers. But thanks to this tiny ad, I wasn't bitten once.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic