android-components / / TopSiteStorage


class TopSiteStorage (source)

A storage implementation for organizing top sites.


Name Summary
<init> TopSiteStorage(context: <ERROR CLASS>)
A storage implementation for organizing top sites.


Name Summary
addTopSite fun addTopSite(title: String, url: String): Unit
Adds a new TopSite.
getTopSites fun getTopSites(): LiveData<List<TopSite>>
Returns a LiveData list of all the TopSite instances.
getTopSitesPaged fun getTopSitesPaged(): Factory<Int, TopSite>
Returns all TopSites as a DataSource.Factory.
removeTopSite fun removeTopSite(site: TopSite): Unit
Removes the given TopSite.

Extension Functions

Name Summary
loadResourceAsString fun Any.loadResourceAsString(path: String): String
Loads a file from the resources folder and returns its content as a string object.