diff --git a/samples/ApiDemos/src/com/example/android/apis/ApiDemosApplication.java b/samples/ApiDemos/src/com/example/android/apis/ApiDemosApplication.java index 92460e50e..5ed171407 100644 --- a/samples/ApiDemos/src/com/example/android/apis/ApiDemosApplication.java +++ b/samples/ApiDemos/src/com/example/android/apis/ApiDemosApplication.java @@ -16,8 +16,6 @@ package com.example.android.apis; -import com.example.android.apis.app.DefaultValues; - import android.app.Application; import android.preference.PreferenceManager; @@ -33,6 +31,7 @@ import android.preference.PreferenceManager; */ public class ApiDemosApplication extends Application { + @Override public void onCreate() { /* * This populates the default values from the preferences XML file. See @@ -41,6 +40,7 @@ public class ApiDemosApplication extends Application { PreferenceManager.setDefaultValues(this, R.xml.default_values, false); } + @Override public void onTerminate() { } } diff --git a/samples/ApiDemos/src/com/example/android/apis/app/IncomingMessageView.java b/samples/ApiDemos/src/com/example/android/apis/app/IncomingMessageView.java index c3bead027..13ea3dae1 100644 --- a/samples/ApiDemos/src/com/example/android/apis/app/IncomingMessageView.java +++ b/samples/ApiDemos/src/com/example/android/apis/app/IncomingMessageView.java @@ -22,14 +22,13 @@ import android.app.Activity; import android.app.NotificationManager; import android.os.Bundle; -import java.util.Map; - /** * This activity is run as the click activity for {@link IncomingMessage}. * When it comes up, it also clears the notification, because the "message" * has been "read." */ public class IncomingMessageView extends Activity { + @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.incoming_message_view); diff --git a/samples/ApiDemos/src/com/example/android/apis/appwidget/ExampleAppWidgetProvider.java b/samples/ApiDemos/src/com/example/android/apis/appwidget/ExampleAppWidgetProvider.java index 6977d3e6e..61aba6385 100644 --- a/samples/ApiDemos/src/com/example/android/apis/appwidget/ExampleAppWidgetProvider.java +++ b/samples/ApiDemos/src/com/example/android/apis/appwidget/ExampleAppWidgetProvider.java @@ -20,14 +20,11 @@ import android.appwidget.AppWidgetManager; import android.appwidget.AppWidgetProvider; import android.content.ComponentName; import android.content.Context; -import android.content.Intent; import android.content.pm.PackageManager; import android.os.SystemClock; import android.util.Log; import android.widget.RemoteViews; -import java.util.ArrayList; - // Need the following import to get access to the app resources, since this // class is in a sub-package. import com.example.android.apis.R; @@ -51,6 +48,7 @@ public class ExampleAppWidgetProvider extends AppWidgetProvider { // log tag private static final String TAG = "ExampleAppWidgetProvider"; + @Override public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) { Log.d(TAG, "onUpdate"); // For each widget that needs an update, get the text that we should display: @@ -65,6 +63,7 @@ public class ExampleAppWidgetProvider extends AppWidgetProvider { } } + @Override public void onDeleted(Context context, int[] appWidgetIds) { Log.d(TAG, "onDeleted"); // When the user deletes the widget, delete the preference associated with it. @@ -74,6 +73,7 @@ public class ExampleAppWidgetProvider extends AppWidgetProvider { } } + @Override public void onEnabled(Context context) { Log.d(TAG, "onEnabled"); // When the first widget is created, register for the TIMEZONE_CHANGED and TIME_CHANGED @@ -87,11 +87,11 @@ public class ExampleAppWidgetProvider extends AppWidgetProvider { PackageManager.DONT_KILL_APP); } + @Override public void onDisabled(Context context) { // When the first widget is created, stop listening for the TIMEZONE_CHANGED and // TIME_CHANGED broadcasts. Log.d(TAG, "onDisabled"); - Class clazz = ExampleBroadcastReceiver.class; PackageManager pm = context.getPackageManager(); pm.setComponentEnabledSetting( new ComponentName("com.example.android.apis", ".appwidget.ExampleBroadcastReceiver"), diff --git a/samples/ApiDemos/src/com/example/android/apis/appwidget/ExampleBroadcastReceiver.java b/samples/ApiDemos/src/com/example/android/apis/appwidget/ExampleBroadcastReceiver.java index f6e01add1..cf23f3d45 100644 --- a/samples/ApiDemos/src/com/example/android/apis/appwidget/ExampleBroadcastReceiver.java +++ b/samples/ApiDemos/src/com/example/android/apis/appwidget/ExampleBroadcastReceiver.java @@ -17,21 +17,13 @@ package com.example.android.apis.appwidget; import android.appwidget.AppWidgetManager; -import android.appwidget.AppWidgetProvider; import android.content.BroadcastReceiver; -import android.content.ComponentName; import android.content.Context; import android.content.Intent; -import android.os.SystemClock; import android.util.Log; -import android.widget.RemoteViews; import java.util.ArrayList; -// Need the following import to get access to the app resources, since this -// class is in a sub-package. -import com.example.android.apis.R; - /** * A BroadcastReceiver that listens for updates for the ExampleAppWidgetProvider. This * BroadcastReceiver starts off disabled, and we only enable it when there is a widget @@ -39,6 +31,7 @@ import com.example.android.apis.R; */ public class ExampleBroadcastReceiver extends BroadcastReceiver { + @Override public void onReceive(Context context, Intent intent) { Log.d("ExmampleBroadcastReceiver", "intent=" + intent); @@ -48,8 +41,8 @@ public class ExampleBroadcastReceiver extends BroadcastReceiver { if (action.equals(Intent.ACTION_TIMEZONE_CHANGED) || action.equals(Intent.ACTION_TIME_CHANGED)) { AppWidgetManager gm = AppWidgetManager.getInstance(context); - ArrayList appWidgetIds = new ArrayList(); - ArrayList texts = new ArrayList(); + ArrayList appWidgetIds = new ArrayList(); + ArrayList texts = new ArrayList(); ExampleAppWidgetConfigure.loadAllTitlePrefs(context, appWidgetIds, texts); diff --git a/samples/ApiDemos/src/com/example/android/apis/graphics/ColorPickerDialog.java b/samples/ApiDemos/src/com/example/android/apis/graphics/ColorPickerDialog.java index cc4a0d431..7588180f4 100644 --- a/samples/ApiDemos/src/com/example/android/apis/graphics/ColorPickerDialog.java +++ b/samples/ApiDemos/src/com/example/android/apis/graphics/ColorPickerDialog.java @@ -16,7 +16,6 @@ package com.example.android.apis.graphics; -import android.R; import android.os.Bundle; import android.app.Dialog; import android.content.Context; @@ -218,7 +217,7 @@ public class ColorPickerDialog extends Dialog { mInitialColor = initialColor; } - + @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); OnColorChangedListener l = new OnColorChangedListener() { diff --git a/samples/ApiDemos/src/com/example/android/apis/graphics/kube/GLColor.java b/samples/ApiDemos/src/com/example/android/apis/graphics/kube/GLColor.java index 7d4c7c1eb..7478cf420 100644 --- a/samples/ApiDemos/src/com/example/android/apis/graphics/kube/GLColor.java +++ b/samples/ApiDemos/src/com/example/android/apis/graphics/kube/GLColor.java @@ -18,31 +18,34 @@ package com.example.android.apis.graphics.kube; public class GLColor { - public final int red; - public final int green; - public final int blue; - public final int alpha; - - public GLColor(int red, int green, int blue, int alpha) { - this.red = red; - this.green = green; - this.blue = blue; - this.alpha = alpha; - } + public final int red; + public final int green; + public final int blue; + public final int alpha; - public GLColor(int red, int green, int blue) { - this.red = red; - this.green = green; - this.blue = blue; - this.alpha = 0x10000; - } - - public boolean equals(Object other) { - if (other instanceof GLColor) { - GLColor color = (GLColor)other; - return (red == color.red && green == color.green && - blue == color.blue && alpha == color.alpha); - } - return false; - } + public GLColor(int red, int green, int blue, int alpha) { + this.red = red; + this.green = green; + this.blue = blue; + this.alpha = alpha; + } + + public GLColor(int red, int green, int blue) { + this.red = red; + this.green = green; + this.blue = blue; + this.alpha = 0x10000; + } + + @Override + public boolean equals(Object other) { + if (other instanceof GLColor) { + GLColor color = (GLColor)other; + return (red == color.red && + green == color.green && + blue == color.blue && + alpha == color.alpha); + } + return false; + } } diff --git a/samples/ApiDemos/src/com/example/android/apis/graphics/kube/GLVertex.java b/samples/ApiDemos/src/com/example/android/apis/graphics/kube/GLVertex.java index b5cd873f7..6e3bf68e1 100644 --- a/samples/ApiDemos/src/com/example/android/apis/graphics/kube/GLVertex.java +++ b/samples/ApiDemos/src/com/example/android/apis/graphics/kube/GLVertex.java @@ -19,70 +19,71 @@ package com.example.android.apis.graphics.kube; import java.nio.IntBuffer; public class GLVertex { - - public float x; - public float y; - public float z; - final short index; // index in vertex table - GLColor color; - - GLVertex() { - this.x = 0; - this.y = 0; - this.z = 0; - this.index = -1; - } - GLVertex(float x, float y, float z, int index) { - this.x = x; - this.y = y; - this.z = z; - this.index = (short)index; - } + public float x; + public float y; + public float z; + final short index; // index in vertex table + GLColor color; - public boolean equals(Object other) { - if (other instanceof GLVertex) { - GLVertex v = (GLVertex)other; - return (x == v.x && y == v.y && z == v.z); - } - return false; - } - - static public int toFixed(float x) { - return (int)(x*65536.0f); + GLVertex() { + this.x = 0; + this.y = 0; + this.z = 0; + this.index = -1; } - public void put(IntBuffer vertexBuffer, IntBuffer colorBuffer) { - vertexBuffer.put(toFixed(x)); - vertexBuffer.put(toFixed(y)); - vertexBuffer.put(toFixed(z)); - if (color == null) { - colorBuffer.put(0); - colorBuffer.put(0); - colorBuffer.put(0); - colorBuffer.put(0); - } else { - colorBuffer.put(color.red); - colorBuffer.put(color.green); - colorBuffer.put(color.blue); - colorBuffer.put(color.alpha); - } - } - - public void update(IntBuffer vertexBuffer, M4 transform) { - // skip to location of vertex in mVertex buffer - vertexBuffer.position(index * 3); - - if (transform == null) { - vertexBuffer.put(toFixed(x)); - vertexBuffer.put(toFixed(y)); - vertexBuffer.put(toFixed(z)); - } else { - GLVertex temp = new GLVertex(); - transform.multiply(this, temp); - vertexBuffer.put(toFixed(temp.x)); - vertexBuffer.put(toFixed(temp.y)); - vertexBuffer.put(toFixed(temp.z)); - } - } + GLVertex(float x, float y, float z, int index) { + this.x = x; + this.y = y; + this.z = z; + this.index = (short)index; + } + + @Override + public boolean equals(Object other) { + if (other instanceof GLVertex) { + GLVertex v = (GLVertex)other; + return (x == v.x && y == v.y && z == v.z); + } + return false; + } + + static public int toFixed(float x) { + return (int)(x * 65536.0f); + } + + public void put(IntBuffer vertexBuffer, IntBuffer colorBuffer) { + vertexBuffer.put(toFixed(x)); + vertexBuffer.put(toFixed(y)); + vertexBuffer.put(toFixed(z)); + if (color == null) { + colorBuffer.put(0); + colorBuffer.put(0); + colorBuffer.put(0); + colorBuffer.put(0); + } else { + colorBuffer.put(color.red); + colorBuffer.put(color.green); + colorBuffer.put(color.blue); + colorBuffer.put(color.alpha); + } + } + + public void update(IntBuffer vertexBuffer, M4 transform) { + // skip to location of vertex in mVertex buffer + vertexBuffer.position(index * 3); + + if (transform == null) { + vertexBuffer.put(toFixed(x)); + vertexBuffer.put(toFixed(y)); + vertexBuffer.put(toFixed(z)); + } else { + GLVertex temp = new GLVertex(); + transform.multiply(this, temp); + vertexBuffer.put(toFixed(temp.x)); + vertexBuffer.put(toFixed(temp.y)); + vertexBuffer.put(toFixed(temp.z)); + } + } } diff --git a/samples/ApiDemos/src/com/example/android/apis/graphics/kube/KubeRenderer.java b/samples/ApiDemos/src/com/example/android/apis/graphics/kube/KubeRenderer.java index 9977041a2..58b03dae5 100644 --- a/samples/ApiDemos/src/com/example/android/apis/graphics/kube/KubeRenderer.java +++ b/samples/ApiDemos/src/com/example/android/apis/graphics/kube/KubeRenderer.java @@ -18,7 +18,6 @@ package com.example.android.apis.graphics.kube; import android.opengl.GLSurfaceView; -import javax.microedition.khronos.egl.EGL10; import javax.microedition.khronos.egl.EGLConfig; import javax.microedition.khronos.opengles.GL10; diff --git a/samples/ApiDemos/src/com/example/android/apis/media/MediaPlayerDemo.java b/samples/ApiDemos/src/com/example/android/apis/media/MediaPlayerDemo.java index 4b89167b4..1303d3598 100644 --- a/samples/ApiDemos/src/com/example/android/apis/media/MediaPlayerDemo.java +++ b/samples/ApiDemos/src/com/example/android/apis/media/MediaPlayerDemo.java @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2009 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.example.android.apis.media; import com.example.android.apis.R; diff --git a/samples/ApiDemos/src/com/example/android/apis/media/MediaPlayerDemo_Audio.java b/samples/ApiDemos/src/com/example/android/apis/media/MediaPlayerDemo_Audio.java index 39930f69e..b209ce9d5 100644 --- a/samples/ApiDemos/src/com/example/android/apis/media/MediaPlayerDemo_Audio.java +++ b/samples/ApiDemos/src/com/example/android/apis/media/MediaPlayerDemo_Audio.java @@ -1,3 +1,19 @@ +/* + * Copyright (C) 2009 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.example.android.apis.media; import android.app.Activity; @@ -23,6 +39,7 @@ public class MediaPlayerDemo_Audio extends Activity { private TextView tx; + @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); tx = new TextView(this); diff --git a/samples/ApiDemos/src/com/example/android/apis/media/MediaPlayerDemo_Video.java b/samples/ApiDemos/src/com/example/android/apis/media/MediaPlayerDemo_Video.java index 601c5a30e..9853d675a 100644 --- a/samples/ApiDemos/src/com/example/android/apis/media/MediaPlayerDemo_Video.java +++ b/samples/ApiDemos/src/com/example/android/apis/media/MediaPlayerDemo_Video.java @@ -1,10 +1,24 @@ +/* + * Copyright (C) 2009 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.example.android.apis.media; import com.example.android.apis.R; -import com.example.android.apis.app.AlarmController; import android.app.Activity; -import android.graphics.PixelFormat; import android.media.AudioManager; import android.media.MediaPlayer; import android.media.MediaPlayer.OnBufferingUpdateListener; @@ -15,9 +29,6 @@ import android.os.Bundle; import android.util.Log; import android.view.SurfaceHolder; import android.view.SurfaceView; -import android.view.View; -import android.view.View.OnClickListener; -import android.widget.Button; import android.widget.Toast; @@ -46,6 +57,7 @@ public class MediaPlayerDemo_Video extends Activity implements * * Called when the activity is first created. */ + @Override public void onCreate(Bundle icicle) { super.onCreate(icicle); setContentView(R.layout.mediaplayer_2); diff --git a/samples/ApiDemos/src/com/example/android/apis/media/VideoViewDemo.java b/samples/ApiDemos/src/com/example/android/apis/media/VideoViewDemo.java index a4fcf5f80..e72c077a6 100644 --- a/samples/ApiDemos/src/com/example/android/apis/media/VideoViewDemo.java +++ b/samples/ApiDemos/src/com/example/android/apis/media/VideoViewDemo.java @@ -1,11 +1,24 @@ +/* + * Copyright (C) 2009 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package com.example.android.apis.media; import com.example.android.apis.R; import android.app.Activity; -import android.graphics.PixelFormat; -import android.net.Uri; import android.os.Bundle; -import android.util.Log; import android.widget.MediaController; import android.widget.Toast; import android.widget.VideoView; diff --git a/samples/ApiDemos/src/com/example/android/apis/view/BaselineNested1.java b/samples/ApiDemos/src/com/example/android/apis/view/BaselineNested1.java index d60e702c2..ab7898cb2 100644 --- a/samples/ApiDemos/src/com/example/android/apis/view/BaselineNested1.java +++ b/samples/ApiDemos/src/com/example/android/apis/view/BaselineNested1.java @@ -20,8 +20,6 @@ import com.example.android.apis.R; import android.app.Activity; import android.os.Bundle; -import android.widget.LinearLayout; -import android.widget.TextView; /** * Baseline alignment includes elements within nested vertical @@ -29,7 +27,7 @@ import android.widget.TextView; */ public class BaselineNested1 extends Activity { - + @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); diff --git a/samples/ApiDemos/src/com/example/android/apis/view/BaselineNested2.java b/samples/ApiDemos/src/com/example/android/apis/view/BaselineNested2.java index 32574d7d6..1b2c5857b 100644 --- a/samples/ApiDemos/src/com/example/android/apis/view/BaselineNested2.java +++ b/samples/ApiDemos/src/com/example/android/apis/view/BaselineNested2.java @@ -20,8 +20,6 @@ import com.example.android.apis.R; import android.app.Activity; import android.os.Bundle; -import android.widget.LinearLayout; -import android.widget.TextView; /** * Baseline alignment includes an element within a nested horizontal @@ -29,7 +27,7 @@ import android.widget.TextView; */ public class BaselineNested2 extends Activity { - + @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); diff --git a/samples/ApiDemos/src/com/example/android/apis/view/BaselineNested3.java b/samples/ApiDemos/src/com/example/android/apis/view/BaselineNested3.java index 33770416f..854a10fe2 100644 --- a/samples/ApiDemos/src/com/example/android/apis/view/BaselineNested3.java +++ b/samples/ApiDemos/src/com/example/android/apis/view/BaselineNested3.java @@ -20,8 +20,6 @@ import com.example.android.apis.R; import android.app.Activity; import android.os.Bundle; -import android.widget.LinearLayout; -import android.widget.TextView; /** * Baseline alignment includes a {@link android.widget.LinearLayout} @@ -29,7 +27,7 @@ import android.widget.TextView; */ public class BaselineNested3 extends Activity { - + @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); diff --git a/samples/ApiDemos/src/com/example/android/apis/view/Focus2.java b/samples/ApiDemos/src/com/example/android/apis/view/Focus2.java index 77bf8e021..5ffd847d3 100644 --- a/samples/ApiDemos/src/com/example/android/apis/view/Focus2.java +++ b/samples/ApiDemos/src/com/example/android/apis/view/Focus2.java @@ -23,6 +23,7 @@ import android.os.Bundle; public class Focus2 extends Activity { + @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); diff --git a/samples/ApiDemos/src/com/example/android/apis/view/Focus3.java b/samples/ApiDemos/src/com/example/android/apis/view/Focus3.java index fc3f6df31..c952a647f 100644 --- a/samples/ApiDemos/src/com/example/android/apis/view/Focus3.java +++ b/samples/ApiDemos/src/com/example/android/apis/view/Focus3.java @@ -25,6 +25,7 @@ public class Focus3 extends Activity { private Button mTopButton; private Button mBottomButton; + @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); diff --git a/samples/ApiDemos/src/com/example/android/apis/view/InternalSelectionView.java b/samples/ApiDemos/src/com/example/android/apis/view/InternalSelectionView.java index 3ef84030c..fe415bdac 100644 --- a/samples/ApiDemos/src/com/example/android/apis/view/InternalSelectionView.java +++ b/samples/ApiDemos/src/com/example/android/apis/view/InternalSelectionView.java @@ -199,6 +199,7 @@ public class InternalSelectionView extends View { /* (non-Javadoc) * @see android.view.KeyEvent.Callback#onKeyDown(int, android.view.KeyEvent) */ + @Override public boolean onKeyDown(int keyCode, KeyEvent event) { switch(event.getKeyCode()) { case KeyEvent.KEYCODE_DPAD_UP: diff --git a/samples/ApiDemos/src/com/example/android/apis/view/LayoutAnimation2.java b/samples/ApiDemos/src/com/example/android/apis/view/LayoutAnimation2.java index 1c0014556..9a240f97a 100644 --- a/samples/ApiDemos/src/com/example/android/apis/view/LayoutAnimation2.java +++ b/samples/ApiDemos/src/com/example/android/apis/view/LayoutAnimation2.java @@ -17,7 +17,6 @@ package com.example.android.apis.view; import android.app.ListActivity; -import android.content.Context; import android.os.Bundle; import android.view.animation.AlphaAnimation; import android.view.animation.Animation; diff --git a/samples/ApiDemos/src/com/example/android/apis/view/LayoutAnimation3.java b/samples/ApiDemos/src/com/example/android/apis/view/LayoutAnimation3.java index edc2926f8..59869361e 100644 --- a/samples/ApiDemos/src/com/example/android/apis/view/LayoutAnimation3.java +++ b/samples/ApiDemos/src/com/example/android/apis/view/LayoutAnimation3.java @@ -21,8 +21,6 @@ import com.example.android.apis.R; import android.app.ListActivity; import android.os.Bundle; import android.widget.ArrayAdapter; -import android.widget.ListView; -import android.view.View; public class LayoutAnimation3 extends ListActivity { @Override diff --git a/samples/ApiDemos/src/com/example/android/apis/view/LayoutAnimation5.java b/samples/ApiDemos/src/com/example/android/apis/view/LayoutAnimation5.java index 8ed8a36a3..ced28a730 100644 --- a/samples/ApiDemos/src/com/example/android/apis/view/LayoutAnimation5.java +++ b/samples/ApiDemos/src/com/example/android/apis/view/LayoutAnimation5.java @@ -25,7 +25,6 @@ import android.os.Bundle; import android.view.View; import android.view.ViewGroup; import android.widget.BaseAdapter; -import android.widget.Gallery; import android.widget.GridView; import android.widget.ImageView; diff --git a/samples/ApiDemos/src/com/example/android/apis/view/LayoutAnimation7.java b/samples/ApiDemos/src/com/example/android/apis/view/LayoutAnimation7.java index 6eeb42998..bfda4a550 100644 --- a/samples/ApiDemos/src/com/example/android/apis/view/LayoutAnimation7.java +++ b/samples/ApiDemos/src/com/example/android/apis/view/LayoutAnimation7.java @@ -19,20 +19,7 @@ package com.example.android.apis.view; import com.example.android.apis.R; import android.app.Activity; -import android.content.Intent; -import android.content.pm.PackageManager; import android.os.Bundle; -import android.view.View; -import android.view.ViewGroup; -import android.view.animation.AlphaAnimation; -import android.view.animation.Animation; -import android.view.animation.GridLayoutAnimationController; -import android.widget.BaseAdapter; -import android.widget.Gallery; -import android.widget.GridView; -import android.widget.ImageView; - -import java.util.List; public class LayoutAnimation7 extends Activity { @Override diff --git a/samples/ApiDemos/src/com/example/android/apis/view/List5.java b/samples/ApiDemos/src/com/example/android/apis/view/List5.java index 72a8b8259..76b446926 100644 --- a/samples/ApiDemos/src/com/example/android/apis/view/List5.java +++ b/samples/ApiDemos/src/com/example/android/apis/view/List5.java @@ -49,10 +49,12 @@ public class List5 extends ListActivity { return mStrings.length; } + @Override public boolean areAllItemsEnabled() { return false; } + @Override public boolean isEnabled(int position) { return !mStrings[position].startsWith("-"); }