merge from open-source master
Change-Id: Icb039ab90287961b1ad358b78eaead4a9aa2ae59
This commit is contained in:
@@ -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