kandi X-RAY | Retrofit-sample Summary
kandi X-RAY | Retrofit-sample Summary
Retrofit-sample
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Create a new instance
- Helper method to load data list
- Get the Retrofit instance
- Set the user text user
- Gets the user
- Create the custom view holder
- Returns the count of items in the data list
Retrofit-sample Key Features
Retrofit-sample Examples and Code Snippets
Community Discussions
Trending Discussions on Retrofit-sample
QUESTION
It's been 2 days I'm trying to learn how to use the new Paging Library with the Kotlin Language (first time too)
So I've read many guide / tutorial and Github repo (https://github.com/STAR-ZERO/paging-retrofit-sample) for implementing this paging library and basically my trouble is my LiveData>
inside my ViewModel
is trigger before my api call is ending and I don't know why and I feel the call callback.onResult(it?.results.orEmpty(), null, 2)
doesn't do anything
I'm using this version android.arch.paging:runtime:1.0.1
You can find the repo of my project here : https://github.com/florian-do/TMDB
logcat :
ANSWER
Answered 2018-Oct-27 at 00:08Well, after many changed i've found something who fix the problem but it's so weird.
If I use enqueue
with Retrofit 2.3 it will doesn't work but if i do a .execute()
the LiveData is correctly triggered
If someone have a better explanation of this problem your very welcome !
Edit :
I've just read the Paging library overview
page on android website and i found this :
To display data from a backend server, use the synchronous version of the Retrofit API to load information into your own custom DataSource object.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Retrofit-sample
You can use Retrofit-sample like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the Retrofit-sample component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page