merge from froyo-plus-aosp
Change-Id: I1f4c76c89aad748b006cfc1370a767782e4ca3e7
This commit is contained in:
@@ -10,12 +10,14 @@
|
||||
<classpathentry kind="src" path="packages/apps/Contacts/src"/>
|
||||
<classpathentry kind="src" path="packages/apps/DeskClock/src"/>
|
||||
<classpathentry kind="src" path="packages/apps/Email/src"/>
|
||||
<classpathentry kind="src" path="packages/apps/Gallery3D/src"/>
|
||||
<classpathentry kind="src" path="packages/apps/HTMLViewer/src"/>
|
||||
<classpathentry kind="src" path="packages/apps/Launcher2/src"/>
|
||||
<classpathentry kind="src" path="packages/apps/Mms/src"/>
|
||||
<classpathentry kind="src" path="packages/apps/PackageInstaller/src"/>
|
||||
<classpathentry kind="src" path="packages/apps/Phone/src"/>
|
||||
<classpathentry kind="src" path="packages/apps/QuickSearchBox/src"/>
|
||||
<classpathentry kind="src" path="packages/apps/Provision/src"/>
|
||||
<classpathentry kind="src" path="packages/apps/Settings/src"/>
|
||||
<classpathentry kind="src" path="packages/apps/SoundRecorder/src"/>
|
||||
<classpathentry kind="src" path="packages/apps/Stk/src"/>
|
||||
|
||||
@@ -22,7 +22,6 @@ import com.example.android.apis.R;
|
||||
import com.example.android.apis.view.Controls1;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.ComponentName;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
@@ -20,8 +20,6 @@ package com.example.android.apis.app;
|
||||
// class is in a sub-package.
|
||||
import android.app.Activity;
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.os.RemoteException;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
@@ -29,7 +27,6 @@ import android.widget.Button;
|
||||
|
||||
import com.example.android.apis.R;
|
||||
|
||||
|
||||
/**
|
||||
* Front-end for launching {@link ContactsFilterInstrumentation} example
|
||||
* instrumentation class.
|
||||
|
||||
@@ -23,8 +23,6 @@ import android.view.KeyEvent;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* This is an example implementation of the {@link android.app.Instrumentation}
|
||||
* class, allowing you to run tests against application code. The
|
||||
|
||||
@@ -19,7 +19,6 @@ package com.example.android.apis.app;
|
||||
import com.example.android.apis.ApiDemosApplication;
|
||||
import com.example.android.apis.R;
|
||||
|
||||
import android.app.Application;
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.preference.PreferenceActivity;
|
||||
|
||||
@@ -49,9 +49,9 @@ public class ForegroundService extends Service {
|
||||
static final String ACTION_BACKGROUND = "com.example.android.apis.BACKGROUND";
|
||||
|
||||
// BEGIN_INCLUDE(foreground_compatibility)
|
||||
private static final Class[] mStartForegroundSignature = new Class[] {
|
||||
private static final Class<?>[] mStartForegroundSignature = new Class[] {
|
||||
int.class, Notification.class};
|
||||
private static final Class[] mStopForegroundSignature = new Class[] {
|
||||
private static final Class<?>[] mStopForegroundSignature = new Class[] {
|
||||
boolean.class};
|
||||
|
||||
private NotificationManager mNM;
|
||||
|
||||
@@ -20,8 +20,6 @@ package com.example.android.apis.app;
|
||||
// class is in a sub-package.
|
||||
import android.app.Activity;
|
||||
import android.content.ComponentName;
|
||||
import android.content.Context;
|
||||
import android.os.RemoteException;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
@@ -29,7 +27,6 @@ import android.widget.Button;
|
||||
|
||||
import com.example.android.apis.R;
|
||||
|
||||
|
||||
/**
|
||||
* Front-end for launching {@link LocalSampleInstrumentation} example
|
||||
* instrumentation class.
|
||||
|
||||
@@ -23,8 +23,6 @@ import android.view.KeyEvent;
|
||||
import android.os.Bundle;
|
||||
import android.util.Log;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* This is an example implementation of the {@link android.app.Instrumentation}
|
||||
* class demonstrating instrumentation against one of this application's sample
|
||||
|
||||
@@ -45,6 +45,10 @@ import com.example.android.apis.R;
|
||||
public class LocalService extends Service {
|
||||
private NotificationManager mNM;
|
||||
|
||||
// Unique Identification Number for the Notification.
|
||||
// We use it on Notification start, and to cancel it.
|
||||
private int NOTIFICATION = R.string.local_service_started;
|
||||
|
||||
/**
|
||||
* Class for clients to access. Because we know this service always
|
||||
* runs in the same process as its clients, we don't need to deal with
|
||||
@@ -75,7 +79,7 @@ public class LocalService extends Service {
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
// Cancel the persistent notification.
|
||||
mNM.cancel(R.string.local_service_started);
|
||||
mNM.cancel(NOTIFICATION);
|
||||
|
||||
// Tell the user we stopped.
|
||||
Toast.makeText(this, R.string.local_service_stopped, Toast.LENGTH_SHORT).show();
|
||||
@@ -110,8 +114,7 @@ public class LocalService extends Service {
|
||||
text, contentIntent);
|
||||
|
||||
// Send the notification.
|
||||
// We use a layout id because it is a unique number. We use it later to cancel.
|
||||
mNM.notify(R.string.local_service_started, notification);
|
||||
mNM.notify(NOTIFICATION, notification);
|
||||
}
|
||||
}
|
||||
//END_INCLUDE(service)
|
||||
|
||||
@@ -24,14 +24,11 @@ import android.app.Activity;
|
||||
import android.app.NotificationManager;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.Gravity;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
import android.widget.ImageButton;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.RelativeLayout;
|
||||
|
||||
|
||||
/**
|
||||
* Activity used by StatusBarNotification to show the notification to the user.
|
||||
*/
|
||||
|
||||
@@ -21,14 +21,12 @@ package com.example.android.apis.app;
|
||||
import com.example.android.apis.R;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.ComponentName;
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.widget.Button;
|
||||
|
||||
|
||||
/**
|
||||
* Controller to start and stop a service. The serivce will update a status bar
|
||||
* notification every 5 seconds for a minute.
|
||||
|
||||
@@ -30,7 +30,6 @@ import android.os.ConditionVariable;
|
||||
import android.os.IBinder;
|
||||
import android.os.Parcel;
|
||||
import android.os.RemoteException;
|
||||
import android.widget.RemoteViews;
|
||||
|
||||
/**
|
||||
* This is an example of service that will update its status bar balloon
|
||||
|
||||
@@ -18,9 +18,7 @@ package com.example.android.apis.app;
|
||||
|
||||
import com.example.android.apis.R;
|
||||
|
||||
import android.content.SharedPreferences;
|
||||
import android.os.Bundle;
|
||||
import android.preference.Preference;
|
||||
import android.preference.PreferenceActivity;
|
||||
|
||||
public class PreferencesFromXml extends PreferenceActivity {
|
||||
|
||||
@@ -75,8 +75,6 @@ public class QuickContactsDemo extends ListActivity {
|
||||
@Override
|
||||
public void bindView(View view, Context context, Cursor cursor) {
|
||||
final ContactListItemCache cache = (ContactListItemCache) view.getTag();
|
||||
TextView nameView = cache.nameView;
|
||||
QuickContactBadge photoView = cache.photoView;
|
||||
// Set the name
|
||||
cursor.copyStringToBuffer(SUMMARY_NAME_COLUMN_INDEX, cache.nameBuffer);
|
||||
int size = cache.nameBuffer.sizeCopied;
|
||||
|
||||
@@ -18,8 +18,6 @@ package com.example.android.apis.app;
|
||||
|
||||
// Need the following import to get access to the app resources, since this
|
||||
// class is in a sub-package.
|
||||
import java.util.Map;
|
||||
|
||||
import com.example.android.apis.R;
|
||||
|
||||
import android.app.Activity;
|
||||
@@ -31,8 +29,6 @@ import android.view.View.OnClickListener;
|
||||
import android.widget.Button;
|
||||
import android.widget.TextView;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* Shows how an activity can send data to its launching activity when done.y.
|
||||
* <p>This can be used, for example, to implement a dialog alowing the user to
|
||||
|
||||
@@ -32,6 +32,9 @@ import android.widget.TextView;
|
||||
*/
|
||||
public class RedirectGetter extends Activity
|
||||
{
|
||||
private String mTextPref;
|
||||
private TextView mText;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState)
|
||||
{
|
||||
@@ -45,9 +48,12 @@ public class RedirectGetter extends Activity
|
||||
|
||||
// The text being set.
|
||||
mText = (TextView)findViewById(R.id.text);
|
||||
|
||||
// Display the stored values, or if not stored initialize with an empty String
|
||||
loadPrefs();
|
||||
}
|
||||
|
||||
private final boolean loadPrefs()
|
||||
private final void loadPrefs()
|
||||
{
|
||||
// Retrieve the current redirect values.
|
||||
// NOTE: because this preference is shared between multiple
|
||||
@@ -58,10 +64,9 @@ public class RedirectGetter extends Activity
|
||||
mTextPref = preferences.getString("text", null);
|
||||
if (mTextPref != null) {
|
||||
mText.setText(mTextPref);
|
||||
return true;
|
||||
} else {
|
||||
mText.setText("");
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private OnClickListener mApplyListener = new OnClickListener()
|
||||
@@ -79,8 +84,4 @@ public class RedirectGetter extends Activity
|
||||
finish();
|
||||
}
|
||||
};
|
||||
|
||||
private String mTextPref;
|
||||
TextView mText;
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,6 @@ import android.graphics.PorterDuff;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.view.WindowManager;
|
||||
import android.view.View.OnClickListener;
|
||||
import android.widget.Button;
|
||||
import android.widget.ImageView;
|
||||
|
||||
@@ -22,7 +22,6 @@ import com.example.android.apis.R;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
import android.view.WindowManager;
|
||||
|
||||
/**
|
||||
* <h3>Wallpaper Activity</h3>
|
||||
|
||||
@@ -18,15 +18,12 @@ package com.example.android.apis.graphics;
|
||||
|
||||
import com.example.android.apis.R;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.graphics.*;
|
||||
import android.os.Bundle;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.*;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
|
||||
public class AlphaBitmap extends GraphicsActivity {
|
||||
|
||||
|
||||
@@ -18,14 +18,14 @@ package com.example.android.apis.graphics;
|
||||
|
||||
import com.example.android.apis.R;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.graphics.*;
|
||||
import android.graphics.drawable.*;
|
||||
import android.view.animation.*;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.View;
|
||||
import android.view.animation.Animation;
|
||||
import android.view.animation.TranslateAnimation;
|
||||
|
||||
public class AnimateDrawables extends GraphicsActivity {
|
||||
|
||||
@@ -55,7 +55,8 @@ public class AnimateDrawables extends GraphicsActivity {
|
||||
an.startNow();
|
||||
}
|
||||
|
||||
@Override protected void onDraw(Canvas canvas) {
|
||||
@Override
|
||||
protected void onDraw(Canvas canvas) {
|
||||
canvas.drawColor(Color.WHITE);
|
||||
|
||||
mDrawable.draw(canvas);
|
||||
|
||||
@@ -20,7 +20,6 @@ package com.example.android.apis.graphics;
|
||||
// class is in a sub-package.
|
||||
//import com.example.android.apis.R;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.graphics.*;
|
||||
import android.os.Bundle;
|
||||
|
||||
@@ -18,15 +18,12 @@ package com.example.android.apis.graphics;
|
||||
|
||||
import com.example.android.apis.R;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.graphics.*;
|
||||
import android.graphics.drawable.*;
|
||||
import android.os.Bundle;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.ByteArrayOutputStream;
|
||||
|
||||
@@ -48,6 +45,9 @@ public class BitmapDecode extends GraphicsActivity {
|
||||
private Movie mMovie;
|
||||
private long mMovieStart;
|
||||
|
||||
//Set to false to use decodeByteArray
|
||||
private static final boolean DECODE_STREAM = true;
|
||||
|
||||
private static byte[] streamToBytes(InputStream is) {
|
||||
ByteArrayOutputStream os = new ByteArrayOutputStream(1024);
|
||||
byte[] buffer = new byte[1024];
|
||||
@@ -101,7 +101,8 @@ public class BitmapDecode extends GraphicsActivity {
|
||||
mDrawable.setBounds(150, 20, 300, 100);
|
||||
|
||||
is = context.getResources().openRawResource(R.drawable.animated_gif);
|
||||
if (true) {
|
||||
|
||||
if (DECODE_STREAM) {
|
||||
mMovie = Movie.decodeStream(is);
|
||||
} else {
|
||||
byte[] array = streamToBytes(is);
|
||||
@@ -109,7 +110,8 @@ public class BitmapDecode extends GraphicsActivity {
|
||||
}
|
||||
}
|
||||
|
||||
@Override protected void onDraw(Canvas canvas) {
|
||||
@Override
|
||||
protected void onDraw(Canvas canvas) {
|
||||
canvas.drawColor(0xFFCCCCCC);
|
||||
|
||||
Paint p = new Paint();
|
||||
@@ -140,4 +142,3 @@ public class BitmapDecode extends GraphicsActivity {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,14 +16,9 @@
|
||||
|
||||
package com.example.android.apis.graphics;
|
||||
|
||||
import com.example.android.apis.R;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.graphics.*;
|
||||
import android.graphics.drawable.*;
|
||||
import android.os.Bundle;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.*;
|
||||
|
||||
import java.nio.IntBuffer;
|
||||
@@ -41,7 +36,6 @@ public class BitmapPixels extends GraphicsActivity {
|
||||
private Bitmap mBitmap1;
|
||||
private Bitmap mBitmap2;
|
||||
private Bitmap mBitmap3;
|
||||
private Bitmap mBitmap4;
|
||||
|
||||
// access the red component from a premultiplied color
|
||||
private static int getR32(int c) { return (c >> 0) & 0xFF; }
|
||||
@@ -165,4 +159,3 @@ public class BitmapPixels extends GraphicsActivity {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
package com.example.android.apis.graphics;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.graphics.*;
|
||||
import android.os.Bundle;
|
||||
|
||||
@@ -23,7 +23,6 @@ import android.content.Context;
|
||||
import android.graphics.*;
|
||||
import android.graphics.drawable.*;
|
||||
import android.os.Bundle;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.*;
|
||||
|
||||
public class ColorFilters extends GraphicsActivity {
|
||||
@@ -160,8 +159,6 @@ public class ColorFilters extends GraphicsActivity {
|
||||
|
||||
@Override
|
||||
public boolean onTouchEvent(MotionEvent event) {
|
||||
float x = event.getX();
|
||||
float y = event.getY();
|
||||
switch (event.getAction()) {
|
||||
case MotionEvent.ACTION_DOWN:
|
||||
break;
|
||||
@@ -181,4 +178,3 @@ public class ColorFilters extends GraphicsActivity {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,11 +18,9 @@ package com.example.android.apis.graphics;
|
||||
|
||||
import com.example.android.apis.R;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.graphics.*;
|
||||
import android.os.Bundle;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.View;
|
||||
|
||||
public class ColorMatrixSample extends GraphicsActivity {
|
||||
@@ -35,9 +33,7 @@ public class ColorMatrixSample extends GraphicsActivity {
|
||||
|
||||
private static class SampleView extends View {
|
||||
private Paint mPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
|
||||
private ColorMatrix mCM = new ColorMatrix();
|
||||
private Bitmap mBitmap;
|
||||
private float mSaturation;
|
||||
private float mAngle;
|
||||
|
||||
public SampleView(Context context) {
|
||||
|
||||
@@ -38,7 +38,7 @@ public class Compass extends GraphicsActivity {
|
||||
|
||||
private final SensorEventListener mListener = new SensorEventListener() {
|
||||
public void onSensorChanged(SensorEvent event) {
|
||||
if (Config.LOGD) Log.d(TAG,
|
||||
if (Config.DEBUG) Log.d(TAG,
|
||||
"sensorChanged (" + event.values[0] + ", " + event.values[1] + ", " + event.values[2] + ")");
|
||||
mValues = event.values;
|
||||
if (mView != null) {
|
||||
@@ -62,7 +62,7 @@ public class Compass extends GraphicsActivity {
|
||||
@Override
|
||||
protected void onResume()
|
||||
{
|
||||
if (Config.LOGD) Log.d(TAG, "onResume");
|
||||
if (Config.DEBUG) Log.d(TAG, "onResume");
|
||||
super.onResume();
|
||||
|
||||
mSensorManager.registerListener(mListener, mSensor,
|
||||
@@ -72,7 +72,7 @@ public class Compass extends GraphicsActivity {
|
||||
@Override
|
||||
protected void onStop()
|
||||
{
|
||||
if (Config.LOGD) Log.d(TAG, "onStop");
|
||||
if (Config.DEBUG) Log.d(TAG, "onStop");
|
||||
mSensorManager.unregisterListener(mListener);
|
||||
super.onStop();
|
||||
}
|
||||
@@ -81,7 +81,6 @@ public class Compass extends GraphicsActivity {
|
||||
private Paint mPaint = new Paint();
|
||||
private Path mPath = new Path();
|
||||
private boolean mAnimate;
|
||||
private long mNextTime;
|
||||
|
||||
public SampleView(Context context) {
|
||||
super(context);
|
||||
@@ -118,14 +117,15 @@ public class Compass extends GraphicsActivity {
|
||||
@Override
|
||||
protected void onAttachedToWindow() {
|
||||
mAnimate = true;
|
||||
if (Config.DEBUG) Log.d(TAG, "onAttachedToWindow. mAnimate=" + mAnimate);
|
||||
super.onAttachedToWindow();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDetachedFromWindow() {
|
||||
mAnimate = false;
|
||||
if (Config.DEBUG) Log.d(TAG, "onDetachedFromWindow. mAnimate=" + mAnimate);
|
||||
super.onDetachedFromWindow();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,13 +16,9 @@
|
||||
|
||||
package com.example.android.apis.graphics;
|
||||
|
||||
import com.example.android.apis.R;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.graphics.*;
|
||||
import android.os.Bundle;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.*;
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
|
||||
@@ -88,10 +88,10 @@ class Cube
|
||||
|
||||
public void draw(GL10 gl)
|
||||
{
|
||||
gl.glFrontFace(gl.GL_CW);
|
||||
gl.glVertexPointer(3, gl.GL_FIXED, 0, mVertexBuffer);
|
||||
gl.glColorPointer(4, gl.GL_FIXED, 0, mColorBuffer);
|
||||
gl.glDrawElements(gl.GL_TRIANGLES, 36, gl.GL_UNSIGNED_BYTE, mIndexBuffer);
|
||||
gl.glFrontFace(GL10.GL_CW);
|
||||
gl.glVertexPointer(3, GL10.GL_FIXED, 0, mVertexBuffer);
|
||||
gl.glColorPointer(4, GL10.GL_FIXED, 0, mColorBuffer);
|
||||
gl.glDrawElements(GL10.GL_TRIANGLES, 36, GL10.GL_UNSIGNED_BYTE, mIndexBuffer);
|
||||
}
|
||||
|
||||
private IntBuffer mVertexBuffer;
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
package com.example.android.apis.graphics;
|
||||
|
||||
import javax.microedition.khronos.egl.EGL10;
|
||||
import javax.microedition.khronos.egl.EGLConfig;
|
||||
import javax.microedition.khronos.opengles.GL10;
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
package com.example.android.apis.graphics;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.graphics.*;
|
||||
import android.os.Bundle;
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
package com.example.android.apis.graphics;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.graphics.*;
|
||||
import android.os.Bundle;
|
||||
|
||||
@@ -20,7 +20,6 @@ package com.example.android.apis.graphics;
|
||||
// class is in a sub-package.
|
||||
import com.example.android.apis.R;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
|
||||
public class GradientDrawable1 extends GraphicsActivity {
|
||||
|
||||
@@ -20,9 +20,11 @@ import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.Window;
|
||||
|
||||
class GraphicsActivity extends Activity {
|
||||
// set to true to test Picture
|
||||
private static final boolean TEST_PICTURE = false;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
@@ -30,7 +32,7 @@ class GraphicsActivity extends Activity {
|
||||
|
||||
@Override
|
||||
public void setContentView(View view) {
|
||||
if (false) { // set to true to test Picture
|
||||
if (TEST_PICTURE) {
|
||||
ViewGroup vg = new PictureLayout(this);
|
||||
vg.addView(view);
|
||||
view = vg;
|
||||
@@ -39,4 +41,3 @@ class GraphicsActivity extends Activity {
|
||||
super.setContentView(view);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
package com.example.android.apis.graphics;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.graphics.*;
|
||||
import android.os.Bundle;
|
||||
|
||||
@@ -16,13 +16,9 @@
|
||||
|
||||
package com.example.android.apis.graphics;
|
||||
|
||||
import com.example.android.apis.R;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.graphics.*;
|
||||
import android.os.Bundle;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.*;
|
||||
|
||||
public class MeasureText extends GraphicsActivity {
|
||||
@@ -114,4 +110,3 @@ public class MeasureText extends GraphicsActivity {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
package com.example.android.apis.graphics;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.graphics.*;
|
||||
import android.os.Bundle;
|
||||
|
||||
@@ -20,11 +20,9 @@ package com.example.android.apis.graphics;
|
||||
// class is in a sub-package.
|
||||
//import com.example.android.apis.R;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.graphics.*;
|
||||
import android.os.Bundle;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.View;
|
||||
|
||||
public class PathFillTypes extends GraphicsActivity {
|
||||
|
||||
@@ -16,11 +16,9 @@
|
||||
|
||||
package com.example.android.apis.graphics;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.graphics.*;
|
||||
import android.os.Bundle;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.MotionEvent;
|
||||
import android.view.*;
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@ import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.ViewParent;
|
||||
|
||||
|
||||
public class PictureLayout extends ViewGroup {
|
||||
private final Picture mPicture = new Picture();
|
||||
|
||||
|
||||
@@ -16,13 +16,11 @@
|
||||
|
||||
package com.example.android.apis.graphics;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.graphics.*;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.graphics.drawable.PictureDrawable;
|
||||
import android.os.Bundle;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.View;
|
||||
|
||||
import java.io.*;
|
||||
|
||||
@@ -20,7 +20,6 @@ package com.example.android.apis.graphics;
|
||||
// class is in a sub-package.
|
||||
//import com.example.android.apis.R;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.graphics.*;
|
||||
import android.os.Bundle;
|
||||
@@ -73,9 +72,8 @@ public class PolyToPoly extends GraphicsActivity {
|
||||
mFontMetrics = mPaint.getFontMetrics();
|
||||
}
|
||||
|
||||
@Override protected void onDraw(Canvas canvas) {
|
||||
Paint paint = mPaint;
|
||||
|
||||
@Override
|
||||
protected void onDraw(Canvas canvas) {
|
||||
canvas.drawColor(Color.WHITE);
|
||||
|
||||
canvas.save();
|
||||
@@ -107,4 +105,3 @@ public class PolyToPoly extends GraphicsActivity {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
package com.example.android.apis.graphics;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.graphics.*;
|
||||
import android.os.Bundle;
|
||||
@@ -91,7 +90,8 @@ public class Regions extends GraphicsActivity {
|
||||
r.right - inset, r.bottom - inset, p);
|
||||
}
|
||||
|
||||
@Override protected void onDraw(Canvas canvas) {
|
||||
@Override
|
||||
protected void onDraw(Canvas canvas) {
|
||||
canvas.drawColor(Color.GRAY);
|
||||
|
||||
canvas.save();
|
||||
|
||||
@@ -16,14 +16,10 @@
|
||||
|
||||
package com.example.android.apis.graphics;
|
||||
|
||||
import com.example.android.apis.R;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.graphics.*;
|
||||
import android.graphics.drawable.*;
|
||||
import android.os.Bundle;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.*;
|
||||
|
||||
public class RoundRects extends GraphicsActivity {
|
||||
@@ -112,8 +108,6 @@ public class RoundRects extends GraphicsActivity {
|
||||
setCornerRadii(mDrawable, 0, r, 0, r);
|
||||
mDrawable.draw(canvas);
|
||||
canvas.restore();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
package com.example.android.apis.graphics;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.graphics.*;
|
||||
import android.os.Bundle;
|
||||
@@ -92,9 +91,8 @@ public class ScaleToFit extends GraphicsActivity {
|
||||
canvas.drawRect(mDstR, mHairPaint);
|
||||
}
|
||||
|
||||
@Override protected void onDraw(Canvas canvas) {
|
||||
Paint paint = mPaint;
|
||||
|
||||
@Override
|
||||
protected void onDraw(Canvas canvas) {
|
||||
canvas.drawColor(Color.WHITE);
|
||||
|
||||
canvas.translate(10, 10);
|
||||
@@ -121,4 +119,3 @@ public class ScaleToFit extends GraphicsActivity {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ import android.hardware.SensorEventListener;
|
||||
import android.hardware.SensorManager;
|
||||
import android.os.Bundle;
|
||||
import android.util.Config;
|
||||
import android.util.Log;
|
||||
import android.view.View;
|
||||
|
||||
public class SensorTest extends GraphicsActivity {
|
||||
@@ -96,7 +97,7 @@ public class SensorTest extends GraphicsActivity {
|
||||
if (show) {
|
||||
// only shows if we think the delta is big enough, in an attempt
|
||||
// to detect "serious" moves left/right or up/down
|
||||
android.util.Log.e(TAG, "sensorChanged " + event.sensor.getName() +
|
||||
Log.e(TAG, "sensorChanged " + event.sensor.getName() +
|
||||
" (" + event.values[0] + ", " + event.values[1] + ", " +
|
||||
event.values[2] + ")" + " diff(" + diff[0] +
|
||||
" " + diff[1] + " " + diff[2] + ")");
|
||||
@@ -114,15 +115,15 @@ public class SensorTest extends GraphicsActivity {
|
||||
if ((gestX || gestY) && !(gestX && gestY)) {
|
||||
if (gestX) {
|
||||
if (x < 0) {
|
||||
android.util.Log.e("test", "<<<<<<<< LEFT <<<<<<<<<<<<");
|
||||
Log.e("test", "<<<<<<<< LEFT <<<<<<<<<<<<");
|
||||
} else {
|
||||
android.util.Log.e("test", ">>>>>>>>> RITE >>>>>>>>>>>");
|
||||
Log.e("test", ">>>>>>>>> RITE >>>>>>>>>>>");
|
||||
}
|
||||
} else {
|
||||
if (y < -2) {
|
||||
android.util.Log.e("test", "<<<<<<<< UP <<<<<<<<<<<<");
|
||||
Log.e("test", "<<<<<<<< UP <<<<<<<<<<<<");
|
||||
} else {
|
||||
android.util.Log.e("test", ">>>>>>>>> DOWN >>>>>>>>>>>");
|
||||
Log.e("test", ">>>>>>>>> DOWN >>>>>>>>>>>");
|
||||
}
|
||||
}
|
||||
mLastGestureTime = now;
|
||||
@@ -141,28 +142,27 @@ public class SensorTest extends GraphicsActivity {
|
||||
mSensor = mSensorManager.getDefaultSensor(Sensor.TYPE_ACCELEROMETER);
|
||||
mView = new SampleView(this);
|
||||
setContentView(mView);
|
||||
if (Config.LOGD) android.util.Log.d(TAG, "create " + mSensorManager);
|
||||
if (Config.DEBUG) Log.d(TAG, "create " + mSensorManager);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onResume() {
|
||||
super.onResume();
|
||||
mSensorManager.registerListener(mListener, mSensor, SensorManager.SENSOR_DELAY_FASTEST);
|
||||
if (Config.LOGD) android.util.Log.d(TAG, "resume " + mSensorManager);
|
||||
if (Config.DEBUG) Log.d(TAG, "resume " + mSensorManager);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
mSensorManager.unregisterListener(mListener);
|
||||
super.onStop();
|
||||
if (Config.LOGD) android.util.Log.d(TAG, "stop " + mSensorManager);
|
||||
if (Config.DEBUG) Log.d(TAG, "stop " + mSensorManager);
|
||||
}
|
||||
|
||||
private class SampleView extends View {
|
||||
private Paint mPaint = new Paint();
|
||||
private Path mPath = new Path();
|
||||
private boolean mAnimate;
|
||||
private long mNextTime;
|
||||
|
||||
public SampleView(Context context) {
|
||||
super(context);
|
||||
@@ -200,12 +200,14 @@ public class SensorTest extends GraphicsActivity {
|
||||
@Override
|
||||
protected void onAttachedToWindow() {
|
||||
mAnimate = true;
|
||||
if (Config.DEBUG) Log.d(TAG, "onAttachedToWindow. mAnimate="+mAnimate);
|
||||
super.onAttachedToWindow();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onDetachedFromWindow() {
|
||||
mAnimate = false;
|
||||
if (Config.DEBUG) Log.d(TAG, "onAttachedToWindow. mAnimate="+mAnimate);
|
||||
super.onDetachedFromWindow();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,16 +16,12 @@
|
||||
|
||||
package com.example.android.apis.graphics;
|
||||
|
||||
import com.example.android.apis.R;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.graphics.*;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.graphics.drawable.ShapeDrawable;
|
||||
import android.graphics.drawable.shapes.*;
|
||||
import android.os.Bundle;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.*;
|
||||
|
||||
public class ShapeDrawable1 extends GraphicsActivity {
|
||||
|
||||
@@ -16,11 +16,6 @@
|
||||
|
||||
package com.example.android.apis.graphics;
|
||||
|
||||
// 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;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.graphics.*;
|
||||
import android.os.Bundle;
|
||||
|
||||
@@ -16,13 +16,9 @@
|
||||
|
||||
package com.example.android.apis.graphics;
|
||||
|
||||
import com.example.android.apis.R;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.graphics.*;
|
||||
import android.os.Bundle;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.*;
|
||||
|
||||
public class TextAlign extends GraphicsActivity {
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
package com.example.android.apis.graphics;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.Canvas;
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
package com.example.android.apis.graphics;
|
||||
|
||||
import javax.microedition.khronos.egl.EGL10;
|
||||
import javax.microedition.khronos.egl.EGLConfig;
|
||||
import javax.microedition.khronos.opengles.GL10;
|
||||
|
||||
|
||||
@@ -23,7 +23,6 @@ import java.nio.ByteOrder;
|
||||
import java.nio.FloatBuffer;
|
||||
import java.nio.ShortBuffer;
|
||||
|
||||
import javax.microedition.khronos.egl.EGL10;
|
||||
import javax.microedition.khronos.egl.EGLConfig;
|
||||
import javax.microedition.khronos.opengles.GL10;
|
||||
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
package com.example.android.apis.graphics;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.graphics.*;
|
||||
import android.os.Bundle;
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
package com.example.android.apis.graphics;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.graphics.*;
|
||||
import android.os.Bundle;
|
||||
@@ -64,7 +63,7 @@ public class UnicodeChart extends GraphicsActivity {
|
||||
float[] pos = mPos;
|
||||
int index = 0;
|
||||
for (int col = 0; col < 16; col++) {
|
||||
final float x = col * 20 + 10;
|
||||
final float x = col * XMUL + 10;
|
||||
for (int row = 0; row < 16; row++) {
|
||||
pos[index++] = x;
|
||||
pos[index++] = row * YMUL + YBASE;
|
||||
@@ -73,7 +72,7 @@ public class UnicodeChart extends GraphicsActivity {
|
||||
}
|
||||
|
||||
private float computeX(int index) {
|
||||
return (index >> 4) * 20 + 10;
|
||||
return (index >> 4) * XMUL + 10;
|
||||
}
|
||||
|
||||
private float computeY(int index) {
|
||||
@@ -118,4 +117,3 @@ public class UnicodeChart extends GraphicsActivity {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,17 +18,11 @@ package com.example.android.apis.graphics;
|
||||
|
||||
import com.example.android.apis.R;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.graphics.*;
|
||||
import android.graphics.drawable.*;
|
||||
import android.os.Bundle;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.*;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
public class Vertices extends GraphicsActivity {
|
||||
|
||||
@Override
|
||||
@@ -41,7 +35,6 @@ public class Vertices extends GraphicsActivity {
|
||||
private final Paint mPaint = new Paint();
|
||||
private final float[] mVerts = new float[10];
|
||||
private final float[] mTexs = new float[10];
|
||||
private final int[] mColors = new int[10];
|
||||
private final short[] mIndices = { 0, 1, 2, 3, 4, 1 };
|
||||
|
||||
private final Matrix mMatrix = new Matrix();
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
package com.example.android.apis.graphics;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.graphics.Bitmap;
|
||||
import android.graphics.BitmapShader;
|
||||
|
||||
@@ -49,7 +49,7 @@ public class Animation2 extends Activity implements
|
||||
s.setOnItemSelectedListener(this);
|
||||
}
|
||||
|
||||
public void onItemSelected(AdapterView parent, View v, int position, long id) {
|
||||
public void onItemSelected(AdapterView<?> parent, View v, int position, long id) {
|
||||
switch (position) {
|
||||
|
||||
case 0:
|
||||
@@ -79,7 +79,7 @@ public class Animation2 extends Activity implements
|
||||
}
|
||||
}
|
||||
|
||||
public void onNothingSelected(AdapterView parent) {
|
||||
public void onNothingSelected(AdapterView<?> parent) {
|
||||
}
|
||||
|
||||
private String[] mStrings = {
|
||||
|
||||
@@ -50,7 +50,7 @@ public class Animation3 extends Activity implements AdapterView.OnItemSelectedLi
|
||||
s.setOnItemSelectedListener(this);
|
||||
}
|
||||
|
||||
public void onItemSelected(AdapterView parent, View v, int position, long id) {
|
||||
public void onItemSelected(AdapterView<?> parent, View v, int position, long id) {
|
||||
final View target = findViewById(R.id.target);
|
||||
final View targetParent = (View) target.getParent();
|
||||
|
||||
@@ -96,6 +96,6 @@ public class Animation3 extends Activity implements AdapterView.OnItemSelectedLi
|
||||
target.startAnimation(a);
|
||||
}
|
||||
|
||||
public void onNothingSelected(AdapterView parent) {
|
||||
public void onNothingSelected(AdapterView<?> parent) {
|
||||
}
|
||||
}
|
||||
@@ -19,12 +19,9 @@ package com.example.android.apis.view;
|
||||
import com.example.android.apis.R;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.widget.Spinner;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.AutoCompleteTextView;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
|
||||
public class AutoComplete1 extends Activity {
|
||||
|
||||
|
||||
@@ -19,12 +19,9 @@ package com.example.android.apis.view;
|
||||
import com.example.android.apis.R;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.widget.Spinner;
|
||||
import android.widget.ArrayAdapter;
|
||||
import android.widget.MultiAutoCompleteTextView;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
|
||||
public class AutoComplete6 extends Activity {
|
||||
|
||||
|
||||
@@ -22,9 +22,6 @@ import com.example.android.apis.R;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
import android.widget.Spinner;
|
||||
import android.widget.ArrayAdapter;
|
||||
|
||||
|
||||
/**
|
||||
* A gallery of the different styles of buttons.
|
||||
|
||||
@@ -20,12 +20,10 @@ import com.example.android.apis.R;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
import android.webkit.WebView;
|
||||
import android.widget.ListView;
|
||||
import android.widget.ArrayAdapter;
|
||||
|
||||
|
||||
/**
|
||||
* Demonstrates the use of non-focusable views.
|
||||
*/
|
||||
|
||||
@@ -49,7 +49,7 @@ public class Gallery1 extends Activity {
|
||||
|
||||
// Set a item click listener, and just Toast the clicked position
|
||||
g.setOnItemClickListener(new OnItemClickListener() {
|
||||
public void onItemClick(AdapterView parent, View v, int position, long id) {
|
||||
public void onItemClick(AdapterView<?> parent, View v, int position, long id) {
|
||||
Toast.makeText(Gallery1.this, "" + position, Toast.LENGTH_SHORT).show();
|
||||
}
|
||||
});
|
||||
|
||||
@@ -56,11 +56,11 @@ public class ImageSwitcher1 extends Activity implements
|
||||
g.setOnItemSelectedListener(this);
|
||||
}
|
||||
|
||||
public void onItemSelected(AdapterView parent, View v, int position, long id) {
|
||||
public void onItemSelected(AdapterView<?> parent, View v, int position, long id) {
|
||||
mSwitcher.setImageResource(mImageIds[position]);
|
||||
}
|
||||
|
||||
public void onNothingSelected(AdapterView parent) {
|
||||
public void onNothingSelected(AdapterView<?> parent) {
|
||||
}
|
||||
|
||||
public View makeView() {
|
||||
|
||||
@@ -52,7 +52,6 @@ public class List13 extends ListActivity implements ListView.OnScrollListener {
|
||||
private LayoutInflater mInflater;
|
||||
|
||||
public SlowAdapter(Context context) {
|
||||
mContext = context;
|
||||
mInflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
}
|
||||
|
||||
@@ -114,11 +113,6 @@ public class List13 extends ListActivity implements ListView.OnScrollListener {
|
||||
|
||||
return text;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remember our context so we can use it when constructing views.
|
||||
*/
|
||||
private Context mContext;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -111,8 +111,8 @@ public class List9 extends ListActivity implements ListView.OnScrollListener {
|
||||
|
||||
|
||||
|
||||
public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {
|
||||
int lastItem = firstVisibleItem + visibleItemCount - 1;
|
||||
public void onScroll(AbsListView view, int firstVisibleItem,
|
||||
int visibleItemCount, int totalItemCount) {
|
||||
if (mReady) {
|
||||
char firstLetter = mStrings[firstVisibleItem].charAt(0);
|
||||
|
||||
@@ -120,8 +120,6 @@ public class List9 extends ListActivity implements ListView.OnScrollListener {
|
||||
|
||||
mShowing = true;
|
||||
mDialogText.setVisibility(View.VISIBLE);
|
||||
|
||||
|
||||
}
|
||||
mDialogText.setText(((Character)firstLetter).toString());
|
||||
mHandler.removeCallbacks(mRemoveWindow);
|
||||
@@ -316,5 +314,4 @@ public class List9 extends ListActivity implements ListView.OnScrollListener {
|
||||
"Woodside Cabecou", "Xanadu", "Xynotyro", "Yarg Cornish",
|
||||
"Yarra Valley Pyramid", "Yorkshire Blue", "Zamorano",
|
||||
"Zanetti Grana Padano", "Zanetti Parmigiano Reggiano"};
|
||||
|
||||
}
|
||||
|
||||
@@ -19,7 +19,6 @@ package com.example.android.apis.view;
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
import android.widget.RatingBar;
|
||||
import android.widget.SeekBar;
|
||||
import android.widget.TextView;
|
||||
|
||||
import com.example.android.apis.R;
|
||||
|
||||
@@ -24,7 +24,6 @@ import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Button;
|
||||
|
||||
|
||||
/**
|
||||
* Demonstrates wrapping a layout in a ScrollView.
|
||||
*
|
||||
|
||||
@@ -19,15 +19,9 @@ package com.example.android.apis.view;
|
||||
import com.example.android.apis.R;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.widget.TableLayout;
|
||||
import android.widget.Button;
|
||||
import android.os.Bundle;
|
||||
import android.view.View;
|
||||
|
||||
|
||||
public class TableLayout10 extends Activity {
|
||||
private boolean mShrink;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
@@ -25,8 +25,6 @@ import android.os.Bundle;
|
||||
* <p>This example shows how to use horizontal gravity in a table layout.</p>
|
||||
*/
|
||||
public class TableLayout11 extends Activity {
|
||||
private boolean mShrink;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
@@ -25,8 +25,6 @@ import android.os.Bundle;
|
||||
* <p>This example shows how to use cell spanning in a table layout.</p>
|
||||
*/
|
||||
public class TableLayout12 extends Activity {
|
||||
private boolean mShrink;
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
@@ -21,7 +21,6 @@ import android.os.Bundle;
|
||||
import android.widget.TabHost;
|
||||
import android.widget.TabHost.TabSpec;
|
||||
import android.view.LayoutInflater;
|
||||
import android.view.View;
|
||||
|
||||
import com.example.android.apis.R;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user