문제

Why do we use restartLoader(), if loader already implicitly listens to any updations in the database? Do we use it to reuse the same loader to send a different query?

도움이 되었습니까?

해결책

Because sometimes you might want to change your where condition in your query. You can call restartLoader and pass your where condition in the Bundle argument. restartLoader will call initLoader again and create a new cursorloader with the new where condition. If you don't call restartLoader, you can not change the where condition in your query.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top