Permalink
Browse files

current project status pushed to github

  • Loading branch information...
1 parent 153c68e commit 020f0ea4a5fcb1e81dc199e7aeeae23082df233f @blackivory86 committed Jan 13, 2012
View
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="gen"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
View
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>HickerspaceWidget</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>com.android.ide.eclipse.adt.ApkBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>com.android.ide.eclipse.adt.AndroidNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
@@ -0,0 +1,5 @@
+#Fri Sep 02 21:21:44 CEST 2011
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.source=1.5
View
@@ -0,0 +1,19 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="name.janrose.hick.statuswidget"
+ android:versionCode="1"
+ android:versionName="1.0">
+ <uses-sdk android:minSdkVersion="8" />
+ <uses-permission android:name="android.permission.INTERNET" />
+
+ <application android:icon="@drawable/icon" android:label="@string/app_name">
+ <receiver android:name="StatusWidgetProvider">
+ <intent-filter>
+ <action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
+ </intent-filter>
+ <meta-data android:name="android.appwidget.provider"
+ android:resource="@xml/widget_info" />
+ </receiver>
+ <service android:name="UpdateWidgetService"></service>
+ </application>
+</manifest>
View
@@ -0,0 +1,11 @@
+# This file is automatically generated by Android Tools.
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
+#
+# This file must be checked in Version Control Systems.
+#
+# To customize properties used by the Ant build system use,
+# "build.properties", and override values to adapt the script to your
+# project structure.
+
+# Project target.
+target=android-8
View
@@ -0,0 +1,40 @@
+-optimizationpasses 5
+-dontusemixedcaseclassnames
+-dontskipnonpubliclibraryclasses
+-dontpreverify
+-verbose
+-optimizations !code/simplification/arithmetic,!field/*,!class/merging/*
+
+-keep public class * extends android.app.Activity
+-keep public class * extends android.app.Application
+-keep public class * extends android.app.Service
+-keep public class * extends android.content.BroadcastReceiver
+-keep public class * extends android.content.ContentProvider
+-keep public class * extends android.app.backup.BackupAgentHelper
+-keep public class * extends android.preference.Preference
+-keep public class com.android.vending.licensing.ILicensingService
+
+-keepclasseswithmembernames class * {
+ native <methods>;
+}
+
+-keepclasseswithmembers class * {
+ public <init>(android.content.Context, android.util.AttributeSet);
+}
+
+-keepclasseswithmembers class * {
+ public <init>(android.content.Context, android.util.AttributeSet, int);
+}
+
+-keepclassmembers class * extends android.app.Activity {
+ public void *(android.view.View);
+}
+
+-keepclassmembers enum * {
+ public static **[] values();
+ public static ** valueOf(java.lang.String);
+}
+
+-keep class * implements android.os.Parcelable {
+ public static final android.os.Parcelable$Creator *;
+}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shape="rectangle">
+ <stroke android:width="1dp" android:color="@color/widgetborder" />
+ <gradient android:startColor="@color/bright_red" android:endColor="@color/dark_red" android:angle="90"/>
+
+ <corners android:bottomRightRadius="5dp" android:bottomLeftRadius="5dp"
+ android:topLeftRadius="5dp" android:topRightRadius="5dp"/>
+</shape>
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shape="rectangle">
+ <stroke android:width="1dp" android:color="@color/widgetborder" />
+ <gradient android:startColor="@color/bright_green" android:endColor="@color/dark_green" android:angle="90"/>
+
+ <corners android:bottomRightRadius="5dp" android:bottomLeftRadius="5dp"
+ android:topLeftRadius="5dp" android:topRightRadius="5dp"/>
+</shape>
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<shape xmlns:android="http://schemas.android.com/apk/res/android"
+ android:shape="rectangle">
+ <stroke android:width="1dp" android:color="@color/widgetborder" />
+ <gradient android:startColor="@color/bright_grey" android:endColor="@color/dark_grey" android:angle="90"/>
+
+ <corners android:bottomRightRadius="5dp" android:bottomLeftRadius="5dp"
+ android:topLeftRadius="5dp" android:topRightRadius="5dp"/>
+</shape>
View
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:orientation="vertical"
+ android:layout_width="fill_parent"
+ android:layout_height="fill_parent"
+ >
+<TextView
+ android:layout_width="fill_parent"
+ android:layout_height="wrap_content"
+ android:text="@string/hello"
+ />
+</LinearLayout>
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="utf-8"?>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+ android:layout_width="match_parent" android:layout_height="match_parent" android:id="@+id/widget">
+ <LinearLayout android:id="@+id/unknown"
+ android:layout_width="match_parent" android:layout_height="match_parent"
+ android:background="@drawable/status_unknown_bg" android:layout_margin="4dip">
+ </LinearLayout>
+ <LinearLayout android:id="@+id/open" android:visibility="invisible"
+ android:layout_width="match_parent" android:layout_height="match_parent"
+ android:background="@drawable/status_open_bg" android:layout_margin="4dip">
+ </LinearLayout>
+ <LinearLayout android:id="@+id/closed" android:visibility="invisible"
+ android:layout_width="match_parent" android:layout_height="match_parent"
+ android:background="@drawable/status_closed_bg" android:layout_margin="4dip">
+ </LinearLayout>
+</RelativeLayout>
View
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <color name="widgetborder">#555555</color>
+ <color name="dark_red">#dc2100</color>
+ <color name="bright_red">#e34600</color>
+ <color name="dark_green">#21dc00</color>
+ <color name="bright_green">#46e300</color>
+ <color name="dark_grey">#777777</color>
+ <color name="bright_grey">#999999</color>
+</resources>
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+ <string name="hello">Hello World, HickerspaceWidgetActivity!</string>
+ <string name="app_name">HickerspaceWidget</string>
+</resources>
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="utf-8"?>
+<appwidget-provider
+ xmlns:android="http://schemas.android.com/apk/res/android" android:initialLayout="@layout/widget_layout" android:minWidth="72dp" android:updatePeriodMillis="180000" android:minHeight="72dp">
+
+</appwidget-provider>
@@ -0,0 +1,15 @@
+package name.janrose.hick.statuswidget;
+
+import android.app.Activity;
+import android.os.Bundle;
+import android.util.Log;
+
+public class HickerspaceWidgetActivity extends Activity {
+ /** Called when the activity is first created. */
+ @Override
+ public void onCreate(Bundle savedInstanceState) {
+ Log.i("HickerspaceWidgetActivity", "onCreate");
+ super.onCreate(savedInstanceState);
+ setContentView(R.layout.main);
+ }
+}
@@ -0,0 +1,38 @@
+package name.janrose.hick.statuswidget;
+
+import android.app.PendingIntent;
+import android.appwidget.AppWidgetManager;
+import android.appwidget.AppWidgetProvider;
+import android.content.Context;
+import android.content.Intent;
+import android.util.Log;
+import android.widget.RemoteViews;
+
+public class StatusWidgetProvider extends AppWidgetProvider {
+ @Override
+ public void onUpdate(Context context, AppWidgetManager appWidgetManager,
+ int[] appWidgetIds) {
+
+ Log.i("StatusWidgetProvider", "onUpdate");
+
+ // Build the intent to call the service
+ RemoteViews remoteViews = new RemoteViews(context.getPackageName(), R.layout.widget_layout);
+ Intent intent = new Intent(context.getApplicationContext(), UpdateWidgetService.class);
+ intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS, appWidgetIds);
+
+ // To react to a click we have to use a pending intent as the
+ // onClickListener is
+ // excecuted by the homescreen application
+ PendingIntent pendingIntent = PendingIntent.getService(
+ context.getApplicationContext(), 0, intent,
+ PendingIntent.FLAG_UPDATE_CURRENT);
+ remoteViews.setOnClickPendingIntent(R.id.widget, pendingIntent);
+
+ // Finally update all widgets with the information about the click
+ // listener
+ appWidgetManager.updateAppWidget(appWidgetIds, remoteViews);
+
+ // Update the widgets via the service
+ context.startService(intent);
+ }
+}
Oops, something went wrong.

0 comments on commit 020f0ea

Please sign in to comment.