diff options
author | Tor Norbye <tnorbye@google.com> | 2012-06-21 18:20:13 -0700 |
---|---|---|
committer | Tor Norbye <tnorbye@google.com> | 2012-06-21 18:20:13 -0700 |
commit | a85ff38b62bbeb35ace582729a0cf07088d3905a (patch) | |
tree | db1a865d1844684f39c349c808e7fc9f5d880381 /templates/other/ContentProvider/root/src/app_package/ContentProvider.java.ftl | |
parent | db2bdb124c713e8d56750e9c6406240023f2cc34 (diff) | |
download | sdk-a85ff38b62bbeb35ace582729a0cf07088d3905a.zip sdk-a85ff38b62bbeb35ace582729a0cf07088d3905a.tar.gz sdk-a85ff38b62bbeb35ace582729a0cf07088d3905a.tar.bz2 |
More template tweaks
Generalize the Add Activity wizard into an Add Android Object
wizard and move Custom View in there, such that it's no longer
a top level wizard. Also place service, content provider and
broadcast receivers there.
Fix indentation in simple activity template, and fix template
wizard such that it doesn't reset all the values when you
leave the page (to preview page or previous selector page)
and come back - unless the template has changed.
Change-Id: Idc1e7f76255d8f0010ccc09fbfc79915cc58690d
Diffstat (limited to 'templates/other/ContentProvider/root/src/app_package/ContentProvider.java.ftl')
-rw-r--r-- | templates/other/ContentProvider/root/src/app_package/ContentProvider.java.ftl | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/templates/other/ContentProvider/root/src/app_package/ContentProvider.java.ftl b/templates/other/ContentProvider/root/src/app_package/ContentProvider.java.ftl new file mode 100644 index 0000000..e5b43b5 --- /dev/null +++ b/templates/other/ContentProvider/root/src/app_package/ContentProvider.java.ftl @@ -0,0 +1,50 @@ +package ${packageName}; + +import android.content.ContentProvider; +import android.content.ContentValues; +import android.database.Cursor; +import android.net.Uri; + +public class ${className} extends ContentProvider { + public ${className}() { + } + + @Override + public int delete(Uri uri, String selection, String[] selectionArgs) { + // Implement this to handle requests to delete one or more rows. + throw new UnsupportedOperationException("Not yet implemented"); + } + + @Override + public String getType(Uri uri) { + // TODO: Implement this to handle requests for the MIME type of the data + // at the given URI. + throw new UnsupportedOperationException("Not yet implemented"); + } + + @Override + public Uri insert(Uri uri, ContentValues values) { + // TODO: Implement this to handle requests to insert a new row. + throw new UnsupportedOperationException("Not yet implemented"); + } + + @Override + public boolean onCreate() { + // TODO: Implement this to initialize your content provider on startup. + return false; + } + + @Override + public Cursor query(Uri uri, String[] projection, String selection, + String[] selectionArgs, String sortOrder) { + // TODO: Implement this to handle query requests from clients. + throw new UnsupportedOperationException("Not yet implemented"); + } + + @Override + public int update(Uri uri, ContentValues values, String selection, + String[] selectionArgs) { + // TODO: Implement this to handle requests to update one or more rows. + throw new UnsupportedOperationException("Not yet implemented"); + } +} |