Книга: Beginning Android



The last method you need to implement is getType(). This takes a Uri and returns the MIME type associated with that Uri. The Uri could be a collection or an instance Uri; you need to determine which was provided and return the corresponding MIME type.

For example, here is getType() from Provider:

public String getType(Uri url) {
 if (isCollectionUri(url)) {

As you can see, most of the logic delegates to private getCollectionType() and getSingleType() methods:

private String getCollectionType() {
private String getSingleType() {

Оглавление книги

Оглавление статьи/книги

Генерация: 0.035. Запросов К БД/Cache: 0 / 0
Вверх Вниз