Skip to content

Commit 613c0a2

Browse files
committed
AppWidgetの作成(1)
1 parent 9a9d944 commit 613c0a2

File tree

11 files changed

+118
-0
lines changed

11 files changed

+118
-0
lines changed

AppWidget1/.classpath

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<classpath>
3+
<classpathentry kind="src" path="src"/>
4+
<classpathentry kind="src" path="gen"/>
5+
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
6+
<classpathentry kind="output" path="bin"/>
7+
</classpath>

AppWidget1/.project

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>AppWidget1</name>
4+
<comment></comment>
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
10+
<arguments>
11+
</arguments>
12+
</buildCommand>
13+
<buildCommand>
14+
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
15+
<arguments>
16+
</arguments>
17+
</buildCommand>
18+
<buildCommand>
19+
<name>org.eclipse.jdt.core.javabuilder</name>
20+
<arguments>
21+
</arguments>
22+
</buildCommand>
23+
<buildCommand>
24+
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
25+
<arguments>
26+
</arguments>
27+
</buildCommand>
28+
</buildSpec>
29+
<natures>
30+
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
31+
<nature>org.eclipse.jdt.core.javanature</nature>
32+
</natures>
33+
</projectDescription>

AppWidget1/AndroidManifest.xml

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
3+
package="org.jpn.techbooster.sample.appwidget1"
4+
android:versionCode="1"
5+
android:versionName="1.0">
6+
<application android:icon="@drawable/icon" android:label="@string/app_name">
7+
<receiver
8+
android:name="AppWidget1"
9+
android:label="AppWidget1">
10+
<intent-filter>
11+
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
12+
</intent-filter>
13+
<meta-data
14+
android:name="android.appwidget.provider"
15+
android:resource="@xml/appwidgetsample"
16+
/>
17+
</receiver>
18+
</application>
19+
<uses-sdk android:minSdkVersion="4" />
20+
</manifest>

AppWidget1/default.properties

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# This file is automatically generated by Android Tools.
2+
# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
3+
#
4+
# This file must be checked in Version Control Systems.
5+
#
6+
# To customize properties used by the Ant build system use,
7+
# "build.properties", and override values to adapt the script to your
8+
# project structure.
9+
10+
# Project target.
11+
target=android-4

AppWidget1/res/drawable-hdpi/icon.png

4.05 KB
Loading

AppWidget1/res/drawable-ldpi/icon.png

1.68 KB
Loading

AppWidget1/res/drawable-mdpi/icon.png

2.51 KB
Loading

AppWidget1/res/layout/main.xml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<LinearLayout
3+
xmlns:android="http://schemas.android.com/apk/res/android"
4+
android:layout_width="fill_parent"
5+
android:layout_height="fill_parent"
6+
android:background="#33000000"
7+
android:orientation="vertical">
8+
<TextView
9+
android:id="@+id/text"
10+
android:layout_width="fill_parent"
11+
android:layout_height="wrap_content"
12+
android:text="WidgetSample"
13+
android:textColor="#ffffffff"
14+
/>
15+
<Button
16+
android:id="@+id/button"
17+
android:layout_width="fill_parent"
18+
android:layout_height="wrap_content"
19+
android:text="Push!"
20+
/>
21+
</LinearLayout>

AppWidget1/res/values/strings.xml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<resources>
3+
4+
<string name="app_name">AppWidget1</string>
5+
</resources>
+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<appwidget-provider
3+
xmlns:android="http://schemas.android.com/apk/res/android"
4+
android:initialLayout="@layout/main"
5+
android:minHeight="72dip"
6+
android:minWidth="146dip"
7+
android:updatePeriodMillis="0">
8+
</appwidget-provider>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
package org.jpn.techbooster.sample.appwidget1;
2+
3+
import android.appwidget.AppWidgetManager;
4+
import android.appwidget.AppWidgetProvider;
5+
import android.content.Context;
6+
7+
public class AppWidget1 extends AppWidgetProvider {
8+
@Override
9+
public void onUpdate(Context context, AppWidgetManager appWidgetManager,
10+
int[] appWidgetIds) {
11+
super.onUpdate(context, appWidgetManager, appWidgetIds);
12+
}
13+
}

0 commit comments

Comments
 (0)