• 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
  • Ron McLeod
  • Tim Cooke
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Jeanne Boyarsky
Saloon Keepers:
  • Stephan van Hulst
  • Carey Brown
  • Tim Holloway
  • Piet Souris
Bartenders:

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.

 
Bartender
Posts: 7488
171
  • 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
Bartender
Posts: 7488
171
  • 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 ?
 
If somebody says you look familiar, tell them you are in porn. Or in these tiny ads:
The Low Tech Laboratory Movie Kickstarter is LIVE NOW!
https://www.kickstarter.com/projects/paulwheaton/low-tech
reply
    Bookmark Topic Watch Topic
  • New Topic