aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoman Nurik <romannurik@google.com>2013-03-01 13:30:44 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2013-03-01 13:30:44 +0000
commit47ebdeeeb55ba2ae7b65d6c684b9ff75e8c3dc09 (patch)
tree8a17b008b7f2efcf33968edaebc9328710e92be4
parentfb13a8362b46f2603c22dab4f560c301876f4ead (diff)
parentb82be3fae5f152b10e9daa6aa694da6b6177aefd (diff)
downloadsdk-47ebdeeeb55ba2ae7b65d6c684b9ff75e8c3dc09.zip
sdk-47ebdeeeb55ba2ae7b65d6c684b9ff75e8c3dc09.tar.gz
sdk-47ebdeeeb55ba2ae7b65d6c684b9ff75e8c3dc09.tar.bz2
Merge "New 'AppWidget' ADT Template."
-rw-r--r--templates/other/AppWidget/globals.xml.ftl5
-rw-r--r--templates/other/AppWidget/recipe.xml.ftl31
-rw-r--r--templates/other/AppWidget/root/AndroidManifest.xml.ftl25
-rw-r--r--templates/other/AppWidget/root/res/drawable-nodpi/example_appwidget_preview.pngbin0 -> 3522 bytes
-rw-r--r--templates/other/AppWidget/root/res/layout/appwidget.xml21
-rw-r--r--templates/other/AppWidget/root/res/layout/appwidget_configure.xml27
-rw-r--r--templates/other/AppWidget/root/res/values-v14/dimens.xml10
-rw-r--r--templates/other/AppWidget/root/res/values/dimens.xml10
-rw-r--r--templates/other/AppWidget/root/res/values/strings.xml.ftl8
-rw-r--r--templates/other/AppWidget/root/res/xml/appwidget_info.xml.ftl27
-rw-r--r--templates/other/AppWidget/root/src/app_package/AppWidget.java.ftl63
-rw-r--r--templates/other/AppWidget/root/src/app_package/AppWidgetConfigureActivity.java.ftl102
-rw-r--r--templates/other/AppWidget/template.xml148
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_1x1.pngbin0 -> 2960 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_1x1_h.pngbin0 -> 3750 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_1x1_v.pngbin0 -> 3787 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_1x1_vh.pngbin0 -> 4004 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_1x2.pngbin0 -> 3010 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_1x2_h.pngbin0 -> 3771 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_1x2_v.pngbin0 -> 3835 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_1x2_vh.pngbin0 -> 4065 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_1x3.pngbin0 -> 3058 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_1x3_h.pngbin0 -> 3830 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_1x3_v.pngbin0 -> 3880 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_1x3_vh.pngbin0 -> 4120 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_1x4.pngbin0 -> 3114 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_1x4_h.pngbin0 -> 3880 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_1x4_v.pngbin0 -> 3944 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_1x4_vh.pngbin0 -> 4178 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_2x1.pngbin0 -> 2973 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_2x1_h.pngbin0 -> 3765 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_2x1_v.pngbin0 -> 3794 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_2x1_vh.pngbin0 -> 4020 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_2x2.pngbin0 -> 3023 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_2x2_h.pngbin0 -> 3784 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_2x2_v.pngbin0 -> 3842 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_2x2_vh.pngbin0 -> 4062 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_2x3.pngbin0 -> 3047 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_2x3_h.pngbin0 -> 3849 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_2x3_v.pngbin0 -> 3890 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_2x3_vh.pngbin0 -> 4133 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_2x4.pngbin0 -> 3071 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_2x4_h.pngbin0 -> 3888 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_2x4_v.pngbin0 -> 3946 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_2x4_vh.pngbin0 -> 4168 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_3x1.pngbin0 -> 2950 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_3x1_h.pngbin0 -> 3728 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_3x1_v.pngbin0 -> 3777 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_3x1_vh.pngbin0 -> 3987 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_3x2.pngbin0 -> 2995 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_3x2_h.pngbin0 -> 3747 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_3x2_v.pngbin0 -> 3811 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_3x2_vh.pngbin0 -> 4045 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_3x3.pngbin0 -> 3035 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_3x3_h.pngbin0 -> 3790 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_3x3_v.pngbin0 -> 3844 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_3x3_vh.pngbin0 -> 4080 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_3x4.pngbin0 -> 3051 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_3x4_h.pngbin0 -> 3819 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_3x4_v.pngbin0 -> 3887 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_3x4_vh.pngbin0 -> 4120 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_4x1.pngbin0 -> 2925 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_4x1_h.pngbin0 -> 3710 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_4x1_v.pngbin0 -> 3747 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_4x1_vh.pngbin0 -> 3973 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_4x2.pngbin0 -> 2931 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_4x2_h.pngbin0 -> 3667 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_4x2_v.pngbin0 -> 3730 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_4x2_vh.pngbin0 -> 3960 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_4x3.pngbin0 -> 2934 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_4x3_h.pngbin0 -> 3696 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_4x3_v.pngbin0 -> 3723 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_4x3_vh.pngbin0 -> 3994 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_4x4.pngbin0 -> 2938 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_4x4_h.pngbin0 -> 3639 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_4x4_v.pngbin0 -> 3717 bytes
-rw-r--r--templates/other/AppWidget/thumbs/template_widget_4x4_vh.pngbin0 -> 3932 bytes
77 files changed, 477 insertions, 0 deletions
diff --git a/templates/other/AppWidget/globals.xml.ftl b/templates/other/AppWidget/globals.xml.ftl
new file mode 100644
index 0000000..ac85374
--- /dev/null
+++ b/templates/other/AppWidget/globals.xml.ftl
@@ -0,0 +1,5 @@
+<?xml version="1.0"?>
+<globals>
+ <global id="srcOut" value="src/${slashedPackageName(packageName)}" />
+ <global id="class_name" value="${camelCaseToUnderscore(className)}" />
+</globals>
diff --git a/templates/other/AppWidget/recipe.xml.ftl b/templates/other/AppWidget/recipe.xml.ftl
new file mode 100644
index 0000000..876b7b0
--- /dev/null
+++ b/templates/other/AppWidget/recipe.xml.ftl
@@ -0,0 +1,31 @@
+<?xml version="1.0"?>
+<recipe>
+
+ <merge from="AndroidManifest.xml.ftl" />
+
+ <copy from="res/drawable-nodpi/example_appwidget_preview.png" />
+ <instantiate from="res/layout/appwidget.xml"
+ to="res/layout/${class_name}.xml" />
+
+
+ <#if configurable>
+ <instantiate from="res/layout/appwidget_configure.xml"
+ to="res/layout/${class_name}_configure.xml" />
+ </#if>
+
+ <instantiate from="res/xml/appwidget_info.xml.ftl"
+ to="res/xml/${class_name}_info.xml" />
+ <merge from="res/values/strings.xml.ftl" />
+ <merge from="res/values-v14/dimens.xml" />
+ <merge from="res/values/dimens.xml" />
+
+ <instantiate from="src/app_package/AppWidget.java.ftl"
+ to="${srcOut}/${className}.java" />
+
+ <#if configurable>
+ <instantiate from="src/app_package/AppWidgetConfigureActivity.java.ftl"
+ to="${srcOut}/${className}ConfigureActivity.java" />
+ </#if>
+
+ <open file="${srcOut}/${className}.java" />
+</recipe>
diff --git a/templates/other/AppWidget/root/AndroidManifest.xml.ftl b/templates/other/AppWidget/root/AndroidManifest.xml.ftl
new file mode 100644
index 0000000..8b96d56
--- /dev/null
+++ b/templates/other/AppWidget/root/AndroidManifest.xml.ftl
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android">
+
+ <application>
+
+ <receiver android:name=".${className}" >
+ <intent-filter>
+ <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
+ </intent-filter>
+
+ <meta-data
+ android:name="android.appwidget.provider"
+ android:resource="@xml/${class_name}_info" />
+ </receiver>
+
+ <#if configurable>
+ <activity android:name=".${className}ConfigureActivity" >
+ <intent-filter>
+ <action android:name="android.appwidget.action.APPWIDGET_CONFIGURE" />
+ </intent-filter>
+ </activity>
+ </#if>
+ </application>
+
+</manifest> \ No newline at end of file
diff --git a/templates/other/AppWidget/root/res/drawable-nodpi/example_appwidget_preview.png b/templates/other/AppWidget/root/res/drawable-nodpi/example_appwidget_preview.png
new file mode 100644
index 0000000..894b069
--- /dev/null
+++ b/templates/other/AppWidget/root/res/drawable-nodpi/example_appwidget_preview.png
Binary files differ
diff --git a/templates/other/AppWidget/root/res/layout/appwidget.xml b/templates/other/AppWidget/root/res/layout/appwidget.xml
new file mode 100644
index 0000000..3a00464
--- /dev/null
+++ b/templates/other/AppWidget/root/res/layout/appwidget.xml
@@ -0,0 +1,21 @@
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="match_parent"
+ android:padding="@dimen/widget_margin"
+ android:background="#09C" >
+
+ <TextView
+ android:id="@+id/appwidget_text"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:layout_centerHorizontal="true"
+ android:layout_centerVertical="true"
+ android:text="@string/appwidget_text"
+ android:textColor="#ffffff"
+ android:textSize="24sp"
+ android:textStyle="bold|italic"
+ android:layout_margin="8dp"
+ android:contentDescription="@string/appwidget_text"
+ android:background="#09C"/>
+
+</RelativeLayout> \ No newline at end of file
diff --git a/templates/other/AppWidget/root/res/layout/appwidget_configure.xml b/templates/other/AppWidget/root/res/layout/appwidget_configure.xml
new file mode 100644
index 0000000..8ddc335
--- /dev/null
+++ b/templates/other/AppWidget/root/res/layout/appwidget_configure.xml
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:orientation="vertical"
+ android:padding="16dp">
+
+ <TextView
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/configure"
+ android:layout_marginBottom="8dp" />
+
+ <EditText
+ android:id="@+id/appwidget_text"
+ android:layout_width="match_parent"
+ android:layout_height="wrap_content"
+ android:inputType="text" />
+
+ <Button
+ android:id="@+id/add_button"
+ android:layout_width="wrap_content"
+ android:layout_height="wrap_content"
+ android:text="@string/add_widget"
+ android:layout_marginTop="8dp" />
+
+</LinearLayout> \ No newline at end of file
diff --git a/templates/other/AppWidget/root/res/values-v14/dimens.xml b/templates/other/AppWidget/root/res/values-v14/dimens.xml
new file mode 100644
index 0000000..4db8c59
--- /dev/null
+++ b/templates/other/AppWidget/root/res/values-v14/dimens.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+
+ <!--
+Refer to App Widget Documentation for margin information
+http://developer.android.com/guide/topics/appwidgets/index.html#CreatingLayout
+ -->
+ <dimen name="widget_margin">0dp</dimen>
+
+</resources> \ No newline at end of file
diff --git a/templates/other/AppWidget/root/res/values/dimens.xml b/templates/other/AppWidget/root/res/values/dimens.xml
new file mode 100644
index 0000000..fdececf
--- /dev/null
+++ b/templates/other/AppWidget/root/res/values/dimens.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+
+ <!--
+Refer to App Widget Documentation for margin information
+http://developer.android.com/guide/topics/appwidgets/index.html#CreatingLayout
+ -->
+ <dimen name="widget_margin">8dp</dimen>
+
+</resources> \ No newline at end of file
diff --git a/templates/other/AppWidget/root/res/values/strings.xml.ftl b/templates/other/AppWidget/root/res/values/strings.xml.ftl
new file mode 100644
index 0000000..66c06bc
--- /dev/null
+++ b/templates/other/AppWidget/root/res/values/strings.xml.ftl
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="appwidget_text">EXAMPLE</string>
+ <#if configurable>
+ <string name="configure">Configure</string>
+ </#if>
+ <string name="add_widget">Add widget</string>
+</resources> \ No newline at end of file
diff --git a/templates/other/AppWidget/root/res/xml/appwidget_info.xml.ftl b/templates/other/AppWidget/root/res/xml/appwidget_info.xml.ftl
new file mode 100644
index 0000000..75791be
--- /dev/null
+++ b/templates/other/AppWidget/root/res/xml/appwidget_info.xml.ftl
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="utf-8"?>
+<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"
+ android:minWidth="${-30 + 70 * minWidth?number}dp"
+ android:minHeight="${-30 + 70 * minHeight?number}dp"
+ android:updatePeriodMillis="86400000"
+ android:previewImage="@drawable/example_appwidget_preview"
+ android:initialLayout="@layout/${class_name}"
+<#if configurable>
+ android:configure="${packageName}.${className}ConfigureActivity"
+</#if>
+<#if resizable='both'>
+ android:resizeMode="horizontal|vertical"
+<#elseif resizable='horizontal'>
+ android:resizeMode="horizontal"
+<#elseif resizable='vertical'>
+ android:resizeMode="vertical"
+<#elseif resizable='none'>
+</#if>
+<#if placement='both'>
+ android:widgetCategory="home_screen|keyguard"
+<#elseif placement='homescreen'>
+ android:widgetCategory="home_screen"
+<#elseif placement='keyguard'>
+ android:widgetCategory="keyguard"
+</#if>
+ android:initialKeyguardLayout="@layout/${class_name}">
+</appwidget-provider> \ No newline at end of file
diff --git a/templates/other/AppWidget/root/src/app_package/AppWidget.java.ftl b/templates/other/AppWidget/root/src/app_package/AppWidget.java.ftl
new file mode 100644
index 0000000..d86b0b5
--- /dev/null
+++ b/templates/other/AppWidget/root/src/app_package/AppWidget.java.ftl
@@ -0,0 +1,63 @@
+package ${packageName};
+
+import android.appwidget.AppWidgetManager;
+import android.appwidget.AppWidgetProvider;
+import android.content.Context;
+import android.widget.RemoteViews;
+
+/**
+ * Implementation of App Widget functionality.
+<#if configurable>
+ * App Widget Configuration implemented in {@link ${className}ConfigureActivity ${className}ConfigureActivity}
+</#if>
+ */
+public class ${className} extends AppWidgetProvider {
+
+ @Override
+ public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {
+ // There may be multiple widgets active, so update all of them
+ final int N = appWidgetIds.length;
+ for (int i=0; i<N; i++) {
+ updateAppWidget(context, appWidgetManager, appWidgetIds[i]);
+ }
+ }
+
+<#if configurable>
+ @Override
+ public void onDeleted(Context context, int[] appWidgetIds) {
+ // When the user deletes the widget, delete the preference associated with it.
+ final int N = appWidgetIds.length;
+ for (int i=0; i<N; i++) {
+ ${className}ConfigureActivity.deleteTitlePref(context, appWidgetIds[i]);
+ }
+ }
+</#if>
+
+ @Override
+ public void onEnabled(Context context) {
+ // Enter relevant functionality for when the first widget is created
+ }
+
+ @Override
+ public void onDisabled(Context context) {
+ // Enter relevant functionality for when the last widget is disabled
+ }
+
+ static void updateAppWidget(Context context, AppWidgetManager appWidgetManager,
+ int appWidgetId) {
+
+<#if configurable>
+ CharSequence widgetText = ${className}ConfigureActivity.loadTitlePref(context, appWidgetId);
+<#else>
+ CharSequence widgetText = context.getString(R.string.appwidget_text);
+</#if>
+ // Construct the RemoteViews object
+ RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.${class_name});
+ views.setTextViewText(R.id.appwidget_text, widgetText);
+
+ // Instruct the widget manager to update the widget
+ appWidgetManager.updateAppWidget(appWidgetId, views);
+ }
+}
+
+
diff --git a/templates/other/AppWidget/root/src/app_package/AppWidgetConfigureActivity.java.ftl b/templates/other/AppWidget/root/src/app_package/AppWidgetConfigureActivity.java.ftl
new file mode 100644
index 0000000..3c2be67
--- /dev/null
+++ b/templates/other/AppWidget/root/src/app_package/AppWidgetConfigureActivity.java.ftl
@@ -0,0 +1,102 @@
+package ${packageName};
+
+import android.app.Activity;
+import android.appwidget.AppWidgetManager;
+import android.content.Context;
+import android.content.Intent;
+import android.content.SharedPreferences;
+import android.os.Bundle;
+import android.view.View;
+import android.widget.EditText;
+
+/**
+ * The configuration screen for the {@link ${className} ${className}} AppWidget.
+ */
+public class ${className}ConfigureActivity extends Activity {
+
+ int mAppWidgetId = AppWidgetManager.INVALID_APPWIDGET_ID;
+ EditText mAppWidgetText;
+ private static final String PREFS_NAME = "${packageName}.${className}";
+ private static final String PREF_PREFIX_KEY = "appwidget_";
+
+ public ${className}ConfigureActivity() {
+ super();
+ }
+
+ @Override
+ public void onCreate(Bundle icicle) {
+ super.onCreate(icicle);
+
+ // Set the result to CANCELED. This will cause the widget host to cancel
+ // out of the widget placement if the user presses the back button.
+ setResult(RESULT_CANCELED);
+
+ setContentView(R.layout.${class_name}_configure);
+ mAppWidgetText = (EditText)findViewById(R.id.appwidget_text);
+ findViewById(R.id.add_button).setOnClickListener(mOnClickListener);
+
+ // Find the widget id from the intent.
+ Intent intent = getIntent();
+ Bundle extras = intent.getExtras();
+ if (extras != null) {
+ mAppWidgetId = extras.getInt(
+ AppWidgetManager.EXTRA_APPWIDGET_ID, AppWidgetManager.INVALID_APPWIDGET_ID);
+ }
+
+ // If this activity was started with an intent without an app widget ID, finish with an error.
+ if (mAppWidgetId == AppWidgetManager.INVALID_APPWIDGET_ID) {
+ finish();
+ return;
+ }
+
+ mAppWidgetText.setText(loadTitlePref(${className}ConfigureActivity.this, mAppWidgetId));
+ }
+
+ View.OnClickListener mOnClickListener = new View.OnClickListener() {
+ public void onClick(View v) {
+ final Context context = ${className}ConfigureActivity.this;
+
+ // When the button is clicked, store the string locally
+ String widgetText = mAppWidgetText.getText().toString();
+ saveTitlePref(context,mAppWidgetId,widgetText);
+
+ // It is the responsibility of the configuration activity to update the app widget
+ AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(context);
+ ${className}.updateAppWidget(context, appWidgetManager, mAppWidgetId);
+
+ // Make sure we pass back the original appWidgetId
+ Intent resultValue = new Intent();
+ resultValue.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, mAppWidgetId);
+ setResult(RESULT_OK, resultValue);
+ finish();
+ }
+ };
+
+ // Write the prefix to the SharedPreferences object for this widget
+ static void saveTitlePref(Context context, int appWidgetId, String text) {
+ SharedPreferences.Editor prefs = context.getSharedPreferences(PREFS_NAME, 0).edit();
+ prefs.putString(PREF_PREFIX_KEY + appWidgetId, text);
+ prefs.commit();
+ }
+
+ // Read the prefix from the SharedPreferences object for this widget.
+ // If there is no preference saved, get the default from a resource
+ static String loadTitlePref(Context context, int appWidgetId) {
+ SharedPreferences prefs = context.getSharedPreferences(PREFS_NAME, 0);
+ String titleValue = prefs.getString(PREF_PREFIX_KEY + appWidgetId, null);
+ if (titleValue != null) {
+ return titleValue;
+ } else {
+ return context.getString(R.string.appwidget_text);
+ }
+ }
+
+ static void deleteTitlePref(Context context, int appWidgetId) {
+ SharedPreferences.Editor prefs = context.getSharedPreferences(PREFS_NAME, 0).edit();
+ prefs.remove(PREF_PREFIX_KEY + appWidgetId);
+ prefs.commit();
+ }
+}
+
+
+
diff --git a/templates/other/AppWidget/template.xml b/templates/other/AppWidget/template.xml
new file mode 100644
index 0000000..f071363
--- /dev/null
+++ b/templates/other/AppWidget/template.xml
@@ -0,0 +1,148 @@
+<?xml version="1.0"?>
+<template
+ format="3"
+ revision="1"
+ name="New App Widget"
+ description="Creates a new App Widget"
+ minApi="4"
+ minBuildApi="16">
+
+ <category value="Other" />
+
+ <parameter
+ id="className"
+ name="Class Name"
+ type="string"
+ constraints="class|unique|nonempty"
+ default="NewAppWidget"
+ help="The name of the App Widget to create" />
+
+ <parameter
+ id="placement"
+ name="Placement"
+ type="enum"
+ default="homescreen"
+ help="Make the widget available on the Home-screen and/or on the Keyguard. Keyguard placement is only supported in Android 4.2 and above; this setting is ignored on earlier versions and defaults to Home-screen.">
+ <option id="both">Home-screen and Keyguard</option>
+ <option id="homescreen" default="true" >Home-screen only</option>
+ <option id="keyguard" >Keyguard only (API 17+)</option>
+ </parameter>
+
+ <parameter
+ id="resizable"
+ name="Resizable (API 12+)"
+ type="enum"
+ default="both"
+ help="Allow the user to resize the widget. Feature only available on Android 3.1 and above.">
+ <option id="both" default="true">Horizontally and vertically</option>
+ <option id="horizontal">Only horizontally</option>
+ <option id="vertical" >Only vertically</option>
+ <option id="none">Not resizable</option>
+ </parameter>
+
+ <parameter
+ id="minWidth"
+ name="Minimum Width (cells)"
+ type="enum"
+ default="1">
+ <option id="1" default="true">1</option>
+ <option id="2" >2</option>
+ <option id="3" >3</option>
+ <option id="4" >4</option>
+ </parameter>
+
+ <parameter
+ id="minHeight"
+ name="Minimum Height (cells)"
+ type="enum"
+ default="1">
+ <option id="1" default="true">1</option>
+ <option id="2" >2</option>
+ <option id="3" >3</option>
+ <option id="4" >4</option>
+ </parameter>
+
+ <parameter
+ id="configurable"
+ name="Configuration Screen"
+ type="boolean"
+ default="false"
+ help="Generates a widget configuration activity" />
+
+ <globals file="globals.xml.ftl" />
+ <execute file="recipe.xml.ftl" />
+
+
+ <thumbs>
+ <thumb>thumbs/template_widget_3x3_vh.png</thumb>
+
+ <thumb minWidth="1" minHeight="1" resizable="none" >thumbs/template_widget_1x1.png</thumb>
+ <thumb minWidth="2" minHeight="1" resizable="none" >thumbs/template_widget_2x1.png</thumb>
+ <thumb minWidth="3" minHeight="1" resizable="none" >thumbs/template_widget_3x1.png</thumb>
+ <thumb minWidth="4" minHeight="1" resizable="none" >thumbs/template_widget_4x1.png</thumb>
+ <thumb minWidth="1" minHeight="2" resizable="none" >thumbs/template_widget_1x2.png</thumb>
+ <thumb minWidth="2" minHeight="2" resizable="none" >thumbs/template_widget_2x2.png</thumb>
+ <thumb minWidth="3" minHeight="2" resizable="none" >thumbs/template_widget_3x2.png</thumb>
+ <thumb minWidth="4" minHeight="2" resizable="none" >thumbs/template_widget_4x2.png</thumb>
+ <thumb minWidth="1" minHeight="3" resizable="none" >thumbs/template_widget_1x3.png</thumb>
+ <thumb minWidth="2" minHeight="3" resizable="none" >thumbs/template_widget_2x3.png</thumb>
+ <thumb minWidth="3" minHeight="3" resizable="none" >thumbs/template_widget_3x3.png</thumb>
+ <thumb minWidth="4" minHeight="3" resizable="none" >thumbs/template_widget_4x3.png</thumb>
+ <thumb minWidth="1" minHeight="4" resizable="none" >thumbs/template_widget_1x4.png</thumb>
+ <thumb minWidth="2" minHeight="4" resizable="none" >thumbs/template_widget_2x4.png</thumb>
+ <thumb minWidth="3" minHeight="4" resizable="none" >thumbs/template_widget_3x4.png</thumb>
+ <thumb minWidth="4" minHeight="4" resizable="none" >thumbs/template_widget_4x4.png</thumb>
+
+ <thumb minWidth="1" minHeight="1" resizable="horizontal">thumbs/template_widget_1x1_h.png</thumb>
+ <thumb minWidth="2" minHeight="1" resizable="horizontal">thumbs/template_widget_2x1_h.png</thumb>
+ <thumb minWidth="3" minHeight="1" resizable="horizontal">thumbs/template_widget_3x1_h.png</thumb>
+ <thumb minWidth="4" minHeight="1" resizable="horizontal">thumbs/template_widget_4x1_h.png</thumb>
+ <thumb minWidth="1" minHeight="2" resizable="horizontal">thumbs/template_widget_1x2_h.png</thumb>
+ <thumb minWidth="2" minHeight="2" resizable="horizontal">thumbs/template_widget_2x2_h.png</thumb>
+ <thumb minWidth="3" minHeight="2" resizable="horizontal">thumbs/template_widget_3x2_h.png</thumb>
+ <thumb minWidth="4" minHeight="2" resizable="horizontal">thumbs/template_widget_4x2_h.png</thumb>
+ <thumb minWidth="1" minHeight="3" resizable="horizontal">thumbs/template_widget_1x3_h.png</thumb>
+ <thumb minWidth="2" minHeight="3" resizable="horizontal">thumbs/template_widget_2x3_h.png</thumb>
+ <thumb minWidth="3" minHeight="3" resizable="horizontal">thumbs/template_widget_3x3_h.png</thumb>
+ <thumb minWidth="4" minHeight="3" resizable="horizontal">thumbs/template_widget_4x3_h.png</thumb>
+ <thumb minWidth="1" minHeight="4" resizable="horizontal">thumbs/template_widget_1x4_h.png</thumb>
+ <thumb minWidth="2" minHeight="4" resizable="horizontal">thumbs/template_widget_2x4_h.png</thumb>
+ <thumb minWidth="3" minHeight="4" resizable="horizontal">thumbs/template_widget_3x4_h.png</thumb>
+ <thumb minWidth="4" minHeight="4" resizable="horizontal">thumbs/template_widget_4x4_h.png</thumb>
+
+ <thumb minWidth="1" minHeight="1" resizable="vertical" >thumbs/template_widget_1x1_v.png</thumb>
+ <thumb minWidth="2" minHeight="1" resizable="vertical" >thumbs/template_widget_2x1_v.png</thumb>
+ <thumb minWidth="3" minHeight="1" resizable="vertical" >thumbs/template_widget_3x1_v.png</thumb>
+ <thumb minWidth="4" minHeight="1" resizable="vertical" >thumbs/template_widget_4x1_v.png</thumb>
+ <thumb minWidth="1" minHeight="2" resizable="vertical" >thumbs/template_widget_1x2_v.png</thumb>
+ <thumb minWidth="2" minHeight="2" resizable="vertical" >thumbs/template_widget_2x2_v.png</thumb>
+ <thumb minWidth="3" minHeight="2" resizable="vertical" >thumbs/template_widget_3x2_v.png</thumb>
+ <thumb minWidth="4" minHeight="2" resizable="vertical" >thumbs/template_widget_4x2_v.png</thumb>
+ <thumb minWidth="1" minHeight="3" resizable="vertical" >thumbs/template_widget_1x3_v.png</thumb>
+ <thumb minWidth="2" minHeight="3" resizable="vertical" >thumbs/template_widget_2x3_v.png</thumb>
+ <thumb minWidth="3" minHeight="3" resizable="vertical" >thumbs/template_widget_3x3_v.png</thumb>
+ <thumb minWidth="4" minHeight="3" resizable="vertical" >thumbs/template_widget_4x3_v.png</thumb>
+ <thumb minWidth="1" minHeight="4" resizable="vertical" >thumbs/template_widget_1x4_v.png</thumb>
+ <thumb minWidth="2" minHeight="4" resizable="vertical" >thumbs/template_widget_2x4_v.png</thumb>
+ <thumb minWidth="3" minHeight="4" resizable="vertical" >thumbs/template_widget_3x4_v.png</thumb>
+ <thumb minWidth="4" minHeight="4" resizable="vertical" >thumbs/template_widget_4x4_v.png</thumb>
+
+ <thumb minWidth="1" minHeight="1" resizable="both" >thumbs/template_widget_1x1_vh.png</thumb>
+ <thumb minWidth="2" minHeight="1" resizable="both" >thumbs/template_widget_2x1_vh.png</thumb>
+ <thumb minWidth="3" minHeight="1" resizable="both" >thumbs/template_widget_3x1_vh.png</thumb>
+ <thumb minWidth="4" minHeight="1" resizable="both" >thumbs/template_widget_4x1_vh.png</thumb>
+ <thumb minWidth="1" minHeight="2" resizable="both" >thumbs/template_widget_1x2_vh.png</thumb>
+ <thumb minWidth="2" minHeight="2" resizable="both" >thumbs/template_widget_2x2_vh.png</thumb>
+ <thumb minWidth="3" minHeight="2" resizable="both" >thumbs/template_widget_3x2_vh.png</thumb>
+ <thumb minWidth="4" minHeight="2" resizable="both" >thumbs/template_widget_4x2_vh.png</thumb>
+ <thumb minWidth="1" minHeight="3" resizable="both" >thumbs/template_widget_1x3_vh.png</thumb>
+ <thumb minWidth="2" minHeight="3" resizable="both" >thumbs/template_widget_2x3_vh.png</thumb>
+ <thumb minWidth="3" minHeight="3" resizable="both" >thumbs/template_widget_3x3_vh.png</thumb>
+ <thumb minWidth="4" minHeight="3" resizable="both" >thumbs/template_widget_4x3_vh.png</thumb>
+ <thumb minWidth="1" minHeight="4" resizable="both" >thumbs/template_widget_1x4_vh.png</thumb>
+ <thumb minWidth="2" minHeight="4" resizable="both" >thumbs/template_widget_2x4_vh.png</thumb>
+ <thumb minWidth="3" minHeight="4" resizable="both" >thumbs/template_widget_3x4_vh.png</thumb>
+ <thumb minWidth="4" minHeight="4" resizable="both" >thumbs/template_widget_4x4_vh.png</thumb>
+ </thumbs>
+
+</template>
diff --git a/templates/other/AppWidget/thumbs/template_widget_1x1.png b/templates/other/AppWidget/thumbs/template_widget_1x1.png
new file mode 100644
index 0000000..8b34a24
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_1x1.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_1x1_h.png b/templates/other/AppWidget/thumbs/template_widget_1x1_h.png
new file mode 100644
index 0000000..38ce687
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_1x1_h.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_1x1_v.png b/templates/other/AppWidget/thumbs/template_widget_1x1_v.png
new file mode 100644
index 0000000..0aedac7
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_1x1_v.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_1x1_vh.png b/templates/other/AppWidget/thumbs/template_widget_1x1_vh.png
new file mode 100644
index 0000000..301ee0f
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_1x1_vh.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_1x2.png b/templates/other/AppWidget/thumbs/template_widget_1x2.png
new file mode 100644
index 0000000..0e4181d
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_1x2.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_1x2_h.png b/templates/other/AppWidget/thumbs/template_widget_1x2_h.png
new file mode 100644
index 0000000..37f3b94
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_1x2_h.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_1x2_v.png b/templates/other/AppWidget/thumbs/template_widget_1x2_v.png
new file mode 100644
index 0000000..2d13903
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_1x2_v.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_1x2_vh.png b/templates/other/AppWidget/thumbs/template_widget_1x2_vh.png
new file mode 100644
index 0000000..431f929
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_1x2_vh.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_1x3.png b/templates/other/AppWidget/thumbs/template_widget_1x3.png
new file mode 100644
index 0000000..b0fb55a
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_1x3.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_1x3_h.png b/templates/other/AppWidget/thumbs/template_widget_1x3_h.png
new file mode 100644
index 0000000..14fdc46
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_1x3_h.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_1x3_v.png b/templates/other/AppWidget/thumbs/template_widget_1x3_v.png
new file mode 100644
index 0000000..136b8de
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_1x3_v.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_1x3_vh.png b/templates/other/AppWidget/thumbs/template_widget_1x3_vh.png
new file mode 100644
index 0000000..5e18856
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_1x3_vh.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_1x4.png b/templates/other/AppWidget/thumbs/template_widget_1x4.png
new file mode 100644
index 0000000..2922d34
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_1x4.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_1x4_h.png b/templates/other/AppWidget/thumbs/template_widget_1x4_h.png
new file mode 100644
index 0000000..462c802
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_1x4_h.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_1x4_v.png b/templates/other/AppWidget/thumbs/template_widget_1x4_v.png
new file mode 100644
index 0000000..f239e73
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_1x4_v.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_1x4_vh.png b/templates/other/AppWidget/thumbs/template_widget_1x4_vh.png
new file mode 100644
index 0000000..b05e168
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_1x4_vh.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_2x1.png b/templates/other/AppWidget/thumbs/template_widget_2x1.png
new file mode 100644
index 0000000..9e14ef8
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_2x1.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_2x1_h.png b/templates/other/AppWidget/thumbs/template_widget_2x1_h.png
new file mode 100644
index 0000000..3a8019e
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_2x1_h.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_2x1_v.png b/templates/other/AppWidget/thumbs/template_widget_2x1_v.png
new file mode 100644
index 0000000..d09ff28
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_2x1_v.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_2x1_vh.png b/templates/other/AppWidget/thumbs/template_widget_2x1_vh.png
new file mode 100644
index 0000000..b6093e1
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_2x1_vh.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_2x2.png b/templates/other/AppWidget/thumbs/template_widget_2x2.png
new file mode 100644
index 0000000..2894704
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_2x2.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_2x2_h.png b/templates/other/AppWidget/thumbs/template_widget_2x2_h.png
new file mode 100644
index 0000000..a2ab77c
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_2x2_h.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_2x2_v.png b/templates/other/AppWidget/thumbs/template_widget_2x2_v.png
new file mode 100644
index 0000000..c09f1f7
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_2x2_v.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_2x2_vh.png b/templates/other/AppWidget/thumbs/template_widget_2x2_vh.png
new file mode 100644
index 0000000..21becb2
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_2x2_vh.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_2x3.png b/templates/other/AppWidget/thumbs/template_widget_2x3.png
new file mode 100644
index 0000000..3226127
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_2x3.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_2x3_h.png b/templates/other/AppWidget/thumbs/template_widget_2x3_h.png
new file mode 100644
index 0000000..db2037a
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_2x3_h.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_2x3_v.png b/templates/other/AppWidget/thumbs/template_widget_2x3_v.png
new file mode 100644
index 0000000..af21176
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_2x3_v.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_2x3_vh.png b/templates/other/AppWidget/thumbs/template_widget_2x3_vh.png
new file mode 100644
index 0000000..e0edfb4
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_2x3_vh.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_2x4.png b/templates/other/AppWidget/thumbs/template_widget_2x4.png
new file mode 100644
index 0000000..dfcda22
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_2x4.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_2x4_h.png b/templates/other/AppWidget/thumbs/template_widget_2x4_h.png
new file mode 100644
index 0000000..dc21139
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_2x4_h.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_2x4_v.png b/templates/other/AppWidget/thumbs/template_widget_2x4_v.png
new file mode 100644
index 0000000..6bfc884
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_2x4_v.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_2x4_vh.png b/templates/other/AppWidget/thumbs/template_widget_2x4_vh.png
new file mode 100644
index 0000000..922aeee
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_2x4_vh.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_3x1.png b/templates/other/AppWidget/thumbs/template_widget_3x1.png
new file mode 100644
index 0000000..bb394b9
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_3x1.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_3x1_h.png b/templates/other/AppWidget/thumbs/template_widget_3x1_h.png
new file mode 100644
index 0000000..47b19c3
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_3x1_h.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_3x1_v.png b/templates/other/AppWidget/thumbs/template_widget_3x1_v.png
new file mode 100644
index 0000000..5575850
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_3x1_v.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_3x1_vh.png b/templates/other/AppWidget/thumbs/template_widget_3x1_vh.png
new file mode 100644
index 0000000..c4a5f3f
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_3x1_vh.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_3x2.png b/templates/other/AppWidget/thumbs/template_widget_3x2.png
new file mode 100644
index 0000000..200fba4
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_3x2.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_3x2_h.png b/templates/other/AppWidget/thumbs/template_widget_3x2_h.png
new file mode 100644
index 0000000..b027430
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_3x2_h.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_3x2_v.png b/templates/other/AppWidget/thumbs/template_widget_3x2_v.png
new file mode 100644
index 0000000..b350ae8
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_3x2_v.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_3x2_vh.png b/templates/other/AppWidget/thumbs/template_widget_3x2_vh.png
new file mode 100644
index 0000000..129b706
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_3x2_vh.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_3x3.png b/templates/other/AppWidget/thumbs/template_widget_3x3.png
new file mode 100644
index 0000000..30dfb4b
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_3x3.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_3x3_h.png b/templates/other/AppWidget/thumbs/template_widget_3x3_h.png
new file mode 100644
index 0000000..9b062e9
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_3x3_h.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_3x3_v.png b/templates/other/AppWidget/thumbs/template_widget_3x3_v.png
new file mode 100644
index 0000000..af8b494
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_3x3_v.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_3x3_vh.png b/templates/other/AppWidget/thumbs/template_widget_3x3_vh.png
new file mode 100644
index 0000000..bc92413
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_3x3_vh.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_3x4.png b/templates/other/AppWidget/thumbs/template_widget_3x4.png
new file mode 100644
index 0000000..1759b62
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_3x4.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_3x4_h.png b/templates/other/AppWidget/thumbs/template_widget_3x4_h.png
new file mode 100644
index 0000000..e09fa7e
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_3x4_h.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_3x4_v.png b/templates/other/AppWidget/thumbs/template_widget_3x4_v.png
new file mode 100644
index 0000000..e6451fe
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_3x4_v.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_3x4_vh.png b/templates/other/AppWidget/thumbs/template_widget_3x4_vh.png
new file mode 100644
index 0000000..376611f
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_3x4_vh.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_4x1.png b/templates/other/AppWidget/thumbs/template_widget_4x1.png
new file mode 100644
index 0000000..75031c8
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_4x1.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_4x1_h.png b/templates/other/AppWidget/thumbs/template_widget_4x1_h.png
new file mode 100644
index 0000000..7a4b81f
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_4x1_h.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_4x1_v.png b/templates/other/AppWidget/thumbs/template_widget_4x1_v.png
new file mode 100644
index 0000000..2c8c604
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_4x1_v.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_4x1_vh.png b/templates/other/AppWidget/thumbs/template_widget_4x1_vh.png
new file mode 100644
index 0000000..0b43cd7
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_4x1_vh.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_4x2.png b/templates/other/AppWidget/thumbs/template_widget_4x2.png
new file mode 100644
index 0000000..8328141
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_4x2.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_4x2_h.png b/templates/other/AppWidget/thumbs/template_widget_4x2_h.png
new file mode 100644
index 0000000..d83062c
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_4x2_h.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_4x2_v.png b/templates/other/AppWidget/thumbs/template_widget_4x2_v.png
new file mode 100644
index 0000000..561f47a
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_4x2_v.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_4x2_vh.png b/templates/other/AppWidget/thumbs/template_widget_4x2_vh.png
new file mode 100644
index 0000000..132ccd1
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_4x2_vh.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_4x3.png b/templates/other/AppWidget/thumbs/template_widget_4x3.png
new file mode 100644
index 0000000..c3ea452
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_4x3.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_4x3_h.png b/templates/other/AppWidget/thumbs/template_widget_4x3_h.png
new file mode 100644
index 0000000..57d84ce
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_4x3_h.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_4x3_v.png b/templates/other/AppWidget/thumbs/template_widget_4x3_v.png
new file mode 100644
index 0000000..e8d93fc
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_4x3_v.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_4x3_vh.png b/templates/other/AppWidget/thumbs/template_widget_4x3_vh.png
new file mode 100644
index 0000000..71dfbb3
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_4x3_vh.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_4x4.png b/templates/other/AppWidget/thumbs/template_widget_4x4.png
new file mode 100644
index 0000000..340244f
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_4x4.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_4x4_h.png b/templates/other/AppWidget/thumbs/template_widget_4x4_h.png
new file mode 100644
index 0000000..f20c14e
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_4x4_h.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_4x4_v.png b/templates/other/AppWidget/thumbs/template_widget_4x4_v.png
new file mode 100644
index 0000000..d490c79
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_4x4_v.png
Binary files differ
diff --git a/templates/other/AppWidget/thumbs/template_widget_4x4_vh.png b/templates/other/AppWidget/thumbs/template_widget_4x4_vh.png
new file mode 100644
index 0000000..52e1b4d
--- /dev/null
+++ b/templates/other/AppWidget/thumbs/template_widget_4x4_vh.png
Binary files differ