ApiDemos Clean up
- Add missing @Override - Remove (some) unused imports - Add some missing headers BUG: 2031807
This commit is contained in:
@@ -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() {
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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"),
|
||||
|
||||
@@ -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<Integer> appWidgetIds = new ArrayList();
|
||||
ArrayList<String> texts = new ArrayList();
|
||||
ArrayList<Integer> appWidgetIds = new ArrayList<Integer>();
|
||||
ArrayList<String> texts = new ArrayList<String>();
|
||||
|
||||
ExampleAppWidgetConfigure.loadAllTitlePrefs(context, appWidgetIds, texts);
|
||||
|
||||
|
||||
@@ -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() {
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@ import android.os.Bundle;
|
||||
|
||||
public class Focus2 extends Activity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ public class Focus3 extends Activity {
|
||||
private Button mTopButton;
|
||||
private Button mBottomButton;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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("-");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user