3
私はListViewとその使い方について質問があります。私のProlemは、私のlistViewはビューの一部に過ぎないと私はこれを行う方法がわかりません。Android ListViewの理解
public class MainActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
ListView myListView = (ListView) findViewById(R.id.ListView01);
String[] strings = new String[]{"Test1","Test2"};
ArrayAdapter<String> myArrayAdapter= new ArrayAdapter<String>(this, R.id.ListView01,strings);
myListView.setAdapter(myArrayAdapter);
私はこの問題が "this" in myArrayAdapter!だと思います。
ありがとう非常に:) –