Hi List,
I`m new in developing android apps.
Unfortunatly I have probles from start :(
I`ve created code like this:
package fix.main;
import android.app.Activity;
import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.ListView;
public class Starter extends Activity {
protected String[] items = {"jeden", "dwa", "trzy"};
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
ListView lv = (ListView)findViewById(R.id.listView1);
lv.setAdapter(new ArrayAdapter<String>(this, R.layout.main,
items));
}
}
When I start it in the emulator I ALWAYS get a error that force me to
make "force close"
I have this with every example of ListView from web.
The standard HelloWorld works fine. What is wrong with this code ?
Best regards,
Dawid "Fixus" Pacholczyk
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en