hi guys,

i'm new to android development

in my application i'm try to render a list but when i run the
application i'm getting this dialogBox.

The Application has stopped unexpectedly please try again


any idea about this??

this is my java class

******************************************
public class myFirst extends ListActivity {
    /** Called when the activity is first created. */
        //Button btn;
        TextView selection;
        String[] items ={"Sabre","Virtusa","Micro Image","ECollage","IFS"};

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        //setListAdapter(new ArrayAdapter<String>
(this,android.R.layout.simple_list_item_1,items));
        selection = (TextView) findViewById(R.id.txtV);
      //  btn = (Button) findViewById(R.id.button);
       // btn.setOnClickListener(this);
        //updateTime();
    }


    public void onListItemClick(ListView Parent,View v,int
posistion,long id) {
        selection.setText(items[posistion]);
        }


******************************************

this is my main.xml

******************************************

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/
android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    >
<TextView
        android:id="@+id/txtV"
    android:text="User Name :"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:typeface="monospace"
    />
<ListView
    android:id="@+id/list"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:drawSelectorOnTop="false"
    />
</LinearLayout >
******************************************

-- 
You received this message because you are subscribed to the Google Groups 
"Android Discuss" 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-discuss?hl=en.

Reply via email to