From 40d738a2faa914191de5ff4092c422b15f8021fd Mon Sep 17 00:00:00 2001 From: Ronald Schaten Date: Wed, 8 Jun 2011 13:53:24 +0200 Subject: [PATCH] removed old config.xml (relict from early development) start preferences activity on push --- res/layout/config.xml | 26 ------------------- res/layout/main.xml | 1 + .../android/waldemar/WaldemarWidget.java | 5 ++++ 3 files changed, 6 insertions(+), 26 deletions(-) delete mode 100644 res/layout/config.xml diff --git a/res/layout/config.xml b/res/layout/config.xml deleted file mode 100644 index aca448a..0000000 --- a/res/layout/config.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - \ No newline at end of file diff --git a/res/layout/main.xml b/res/layout/main.xml index 703364f..d7188f8 100644 --- a/res/layout/main.xml +++ b/res/layout/main.xml @@ -29,4 +29,5 @@ android:textColor="@android:color/white" android:text="debug" android:textSize="4pt" /> + \ No newline at end of file diff --git a/src/de/schatenseite/android/waldemar/WaldemarWidget.java b/src/de/schatenseite/android/waldemar/WaldemarWidget.java index 76b00b0..79c2c7f 100644 --- a/src/de/schatenseite/android/waldemar/WaldemarWidget.java +++ b/src/de/schatenseite/android/waldemar/WaldemarWidget.java @@ -82,6 +82,11 @@ public class WaldemarWidget extends AppWidgetProvider { AppWidgetManager appWidgetManager, int appWidgetId) { RemoteViews remoteViews = new RemoteViews(context.getPackageName(), R.layout.main); + // Create an Intent to launch PreferenceActivity + Intent intent = new Intent(context, WaldemarPreferences.class); + PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0); + remoteViews.setOnClickPendingIntent(R.id.daycount, pendingIntent); + DateFormat format = SimpleDateFormat.getTimeInstance( SimpleDateFormat.MEDIUM, Locale.getDefault()); remoteViews.setTextViewText(R.id.debug, format.format(new Date()));