Permalink
Browse files

Make Android library

git-svn-id: http://android-wheel.googlecode.com/svn/trunk@18 c364614a-9a97-51b3-f556-90fca60df64e
  • Loading branch information...
1 parent f94727c commit 64ab94e94f82f17030707edbb025a008b0a43ea6 yuri.kanivets committed Feb 13, 2011
Showing with 197 additions and 88 deletions.
  1. +8 −0 wheel-demo/.classpath
  2. +40 −0 wheel-demo/.project
  3. +62 −0 wheel-demo/AndroidManifest.xml
  4. +14 −0 wheel-demo/default.properties
  5. 0 {wheel → wheel-demo}/gen/kankan/wheel/R.java
  6. +67 −0 wheel-demo/gen/kankan/wheel/demo/R.java
  7. BIN {wheel → wheel-demo}/res/drawable-hdpi/icon.png
  8. BIN {wheel → wheel-demo}/res/drawable-hdpi/my_icon.png
  9. BIN {wheel → wheel-demo}/res/drawable-hdpi/wheel.png
  10. BIN {wheel → wheel-demo}/res/drawable-ldpi/icon.png
  11. BIN {wheel → wheel-demo}/res/drawable-mdpi/icon.png
  12. BIN {wheel → wheel-demo}/res/drawable/canada.png
  13. BIN {wheel → wheel-demo}/res/drawable/france.png
  14. 0 {wheel → wheel-demo}/res/drawable/layout_bg.xml
  15. BIN {wheel → wheel-demo}/res/drawable/ukraine.png
  16. BIN {wheel → wheel-demo}/res/drawable/usa.png
  17. 0 {wheel → wheel-demo}/res/layout/cities_layout.xml
  18. 0 {wheel → wheel-demo}/res/layout/country_layout.xml
  19. 0 {wheel → wheel-demo}/res/layout/date_layout.xml
  20. 0 {wheel → wheel-demo}/res/layout/passw_layout.xml
  21. 0 {wheel → wheel-demo}/res/layout/slot_item.xml
  22. 0 {wheel → wheel-demo}/res/layout/slot_machine_layout.xml
  23. 0 {wheel → wheel-demo}/res/layout/speed1_layout.xml
  24. 0 {wheel → wheel-demo}/res/layout/time2_day.xml
  25. 0 {wheel → wheel-demo}/res/layout/time2_layout.xml
  26. 0 {wheel → wheel-demo}/res/layout/time_layout.xml
  27. 0 {wheel → wheel-demo}/res/layout/units_item.xml
  28. 0 {wheel → wheel-demo}/res/layout/wheel_text_item.xml
  29. 0 {wheel → wheel-demo}/src/kankan/wheel/demo/CitiesActivity.java
  30. 0 {wheel → wheel-demo}/src/kankan/wheel/demo/DateActivity.java
  31. 0 {wheel → wheel-demo}/src/kankan/wheel/demo/PasswActivity.java
  32. 0 {wheel → wheel-demo}/src/kankan/wheel/demo/SlotMachineActivity.java
  33. 0 {wheel → wheel-demo}/src/kankan/wheel/demo/SpeedActivity.java
  34. 0 {wheel → wheel-demo}/src/kankan/wheel/demo/Time2Activity.java
  35. 0 {wheel → wheel-demo}/src/kankan/wheel/demo/TimeActivity.java
  36. 0 {wheel → wheel-demo}/src/kankan/wheel/demo/WheelDemo.java
  37. +5 −60 wheel/AndroidManifest.xml
  38. +1 −0 wheel/default.properties
  39. +0 −28 wheel/src/kankan/wheel/widget/WheelView.java
View
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="src" path="gen"/>
+ <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
+ <classpathentry kind="src" path="wheel_src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
View
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>wheel-demo</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>
+ <linkedResources>
+ <link>
+ <name>wheel_src</name>
+ <type>2</type>
+ <locationURI>_android_wheel_6bdbb5b/src</locationURI>
+ </link>
+ </linkedResources>
+</projectDescription>
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="utf-8"?>
+
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+ package="kankan.wheel.demo"
+ android:versionCode="1"
+ android:versionName="1.0">
+
+ <application android:icon="@drawable/wheel" android:label="WheelDemo">
+
+ <activity android:name="kankan.wheel.demo.WheelDemo">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="android.intent.category.LAUNCHER" />
+ </intent-filter>
+ </activity>
+ <activity android:name="kankan.wheel.demo.TimeActivity" android:label="Time">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="kankan.wheel.WHEEL_SAMPLE"/>
+ </intent-filter>
+ </activity>
+ <activity android:name="kankan.wheel.demo.Time2Activity" android:label="Time 2">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="kankan.wheel.WHEEL_SAMPLE"/>
+ </intent-filter>
+ </activity>
+ <activity android:name="kankan.wheel.demo.DateActivity" android:label="Date">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="kankan.wheel.WHEEL_SAMPLE"/>
+ </intent-filter>
+ </activity>
+ <activity android:name="kankan.wheel.demo.PasswActivity" android:label="Password">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="kankan.wheel.WHEEL_SAMPLE"/>
+ </intent-filter>
+ </activity>
+ <activity android:name="kankan.wheel.demo.SlotMachineActivity" android:label="Slot Machine">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="kankan.wheel.WHEEL_SAMPLE"/>
+ </intent-filter>
+ </activity>
+ <activity android:name="kankan.wheel.demo.CitiesActivity" android:label="Cities">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="kankan.wheel.WHEEL_SAMPLE"/>
+ </intent-filter>
+ </activity>
+ <!-- activity android:name="kankan.wheel.demo.SpeedActivity" android:label="Speed">
+ <intent-filter>
+ <action android:name="android.intent.action.MAIN" />
+ <category android:name="kankan.wheel.WHEEL_SAMPLE"/>
+ </intent-filter>
+ </activity-->
+
+ </application>
+
+
+</manifest>
@@ -0,0 +1,14 @@
+# 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.
+
+# Indicates whether an apk should be generated for each density.
+split.density=false
+# Project target.
+target=android-7
+android.library.reference.1=../wheel
File renamed without changes.
@@ -0,0 +1,67 @@
+/* AUTO-GENERATED FILE. DO NOT MODIFY.
+ *
+ * This class was automatically generated by the
+ * aapt tool from the resource data it found. It
+ * should not be modified by hand.
+ */
+
+package kankan.wheel.demo;
+
+public final class R {
+ public static final class attr {
+ }
+ public static final class drawable {
+ public static final int canada=0x7f020000;
+ public static final int france=0x7f020001;
+ public static final int icon=0x7f020002;
+ public static final int layout_bg=0x7f020003;
+ public static final int my_icon=0x7f020004;
+ public static final int ukraine=0x7f020005;
+ public static final int usa=0x7f020006;
+ public static final int wheel=0x7f020007;
+ public static final int wheel_bg=0x7f020008;
+ public static final int wheel_val=0x7f020009;
+ }
+ public static final class id {
+ public static final int ampm=0x7f040017;
+ public static final int btn_mix=0x7f04000c;
+ public static final int city=0x7f040001;
+ public static final int country=0x7f040000;
+ public static final int country_name=0x7f040003;
+ public static final int day=0x7f040004;
+ public static final int flag=0x7f040002;
+ public static final int hour=0x7f040015;
+ public static final int item=0x7f04000d;
+ public static final int mins=0x7f040016;
+ public static final int month=0x7f040005;
+ public static final int passw_1=0x7f040007;
+ public static final int passw_2=0x7f040008;
+ public static final int passw_3=0x7f040009;
+ public static final int passw_4=0x7f04000a;
+ public static final int pwd_status=0x7f04000b;
+ public static final int slot_1=0x7f04000e;
+ public static final int slot_2=0x7f04000f;
+ public static final int slot_3=0x7f040010;
+ public static final int speed=0x7f040011;
+ public static final int text=0x7f040019;
+ public static final int time=0x7f040018;
+ public static final int time2_monthday=0x7f040014;
+ public static final int time2_weekday=0x7f040013;
+ public static final int units=0x7f040012;
+ public static final int year=0x7f040006;
+ }
+ public static final class layout {
+ public static final int cities_layout=0x7f030000;
+ public static final int country_layout=0x7f030001;
+ public static final int date_layout=0x7f030002;
+ public static final int passw_layout=0x7f030003;
+ public static final int slot_item=0x7f030004;
+ public static final int slot_machine_layout=0x7f030005;
+ public static final int speed1_layout=0x7f030006;
+ public static final int time2_day=0x7f030007;
+ public static final int time2_layout=0x7f030008;
+ public static final int time_layout=0x7f030009;
+ public static final int units_item=0x7f03000a;
+ public static final int wheel_text_item=0x7f03000b;
+ }
+}
File renamed without changes
File renamed without changes
File renamed without changes
View
@@ -1,62 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
-
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="kankan.wheel"
- android:versionCode="1"
- android:versionName="1.0">
-
- <application android:icon="@drawable/wheel" android:label="WheelDemo">
-
- <activity android:name="kankan.wheel.demo.WheelDemo">
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="android.intent.category.LAUNCHER" />
- </intent-filter>
- </activity>
- <activity android:name="kankan.wheel.demo.TimeActivity" android:label="Time">
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="kankan.wheel.WHEEL_SAMPLE"/>
- </intent-filter>
- </activity>
- <activity android:name="kankan.wheel.demo.Time2Activity" android:label="Time 2">
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="kankan.wheel.WHEEL_SAMPLE"/>
- </intent-filter>
- </activity>
- <activity android:name="kankan.wheel.demo.DateActivity" android:label="Date">
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="kankan.wheel.WHEEL_SAMPLE"/>
- </intent-filter>
- </activity>
- <activity android:name="kankan.wheel.demo.PasswActivity" android:label="Password">
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="kankan.wheel.WHEEL_SAMPLE"/>
- </intent-filter>
- </activity>
- <activity android:name="kankan.wheel.demo.SlotMachineActivity" android:label="Slot Machine">
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="kankan.wheel.WHEEL_SAMPLE"/>
- </intent-filter>
- </activity>
- <activity android:name="kankan.wheel.demo.CitiesActivity" android:label="Cities">
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="kankan.wheel.WHEEL_SAMPLE"/>
- </intent-filter>
- </activity>
- <!-- activity android:name="kankan.wheel.demo.SpeedActivity" android:label="Speed">
- <intent-filter>
- <action android:name="android.intent.action.MAIN" />
- <category android:name="kankan.wheel.WHEEL_SAMPLE"/>
- </intent-filter>
- </activity-->
-
- </application>
-
-
-</manifest>
+ package="kankan.wheel" android:versionCode="2" android:versionName="2.1">
+ <application android:label="Android Wheel Widget">
+</application>
+ <uses-sdk android:minSdkVersion="5" android:targetSdkVersion="7"/>
+</manifest>
View
@@ -11,3 +11,4 @@
split.density=false
# Project target.
target=android-7
+android.library=true
@@ -23,25 +23,19 @@
import java.util.List;
import kankan.wheel.R;
-import kankan.wheel.widget.adapters.AdapterWheel;
import kankan.wheel.widget.adapters.WheelViewAdapter;
import android.content.Context;
import android.database.DataSetObserver;
import android.graphics.Canvas;
import android.graphics.drawable.Drawable;
import android.graphics.drawable.GradientDrawable;
import android.graphics.drawable.GradientDrawable.Orientation;
-import android.os.Handler;
-import android.os.Message;
import android.util.AttributeSet;
-import android.view.GestureDetector;
-import android.view.GestureDetector.SimpleOnGestureListener;
import android.view.MotionEvent;
import android.view.View;
import android.view.ViewGroup.LayoutParams;
import android.view.animation.Interpolator;
import android.widget.LinearLayout;
-import android.widget.Scroller;
/**
* Numeric wheel view.
@@ -173,28 +167,6 @@ public void onJustify() {
}
};
- /**
- * Gets wheel adapter
- * @deprecated Use {@link getViewAdapter} instead
- * @return the adapter
- */
- public WheelAdapter getAdapter() {
- if (viewAdapter instanceof AdapterWheel) {
- AdapterWheel adapter = (AdapterWheel) viewAdapter;
- return adapter.getAdapter();
- }
- return null;
- }
-
- /**
- * Sets wheel adapter
- * @deprecated Use {@link setViewAdapter} instead
- * @param adapter the new wheel adapter
- */
- public void setAdapter(WheelAdapter adapter) {
- setViewAdapter(new AdapterWheel(getContext(), adapter));
- }
-
/**
* Set the the specified scrolling interpolator
* @param interpolator the interpolator

0 comments on commit 64ab94e

Please sign in to comment.