From a85ff38b62bbeb35ace582729a0cf07088d3905a Mon Sep 17 00:00:00 2001 From: Tor Norbye Date: Thu, 21 Jun 2012 18:20:13 -0700 Subject: 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 --- .../root/src/app_package/ContentProvider.java.ftl | 50 ++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 templates/other/ContentProvider/root/src/app_package/ContentProvider.java.ftl (limited to 'templates/other/ContentProvider/root/src/app_package/ContentProvider.java.ftl') 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"); + } +} -- cgit v1.1