Custom list starting new activity?
I have built a customized list item to replace the android's simple list item by inflating each list item. The customized list is working and it consists of an image view and a text view.

My problem is, when i try to launch a new activity after a list item is clicked nothing happens even the app wont crash. So, is there a way to launch an activity using list view???

    public class activityone extends ListActivity {
    
    @Override
    public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activitylayout);
		
		setListAdapter(new MyAdapter(this, android.R.layout.simple_list_item_1,      R.id.textView1, 
					       getResources().getStringArray(R.array.names)));
		
	}
    public void onListItemClick(ListView l, View v, int position,
				long id) {
			// TODO Auto-generated method stub
			super.onListItemClick(l, v, position, id);
			
			Object o = this.getListAdapter().getItem(position);
			
			if(getSelectedItemPosition() == 0){
				Intent intent = new Intent(activityone.this,no1.class);
				startActivity(intent);
			}
                                   .
                                   .
                                   . 
                                   .

    }

    private class MyAdapter extends ArrayAdapter<String>{

		public MyAdapter(Context context, int resource, int textViewResourceId,
				String[] strings) {
			super(context, textViewResourceId, strings);
			// TODO Auto-generated constructor stub
		}
		
		@Override
		public View getView(int position, View convertView, ViewGroup parent) {

			LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
			View row = inflater.inflate(R.layout.list_item, parent, false);

			String[] items = getResources().getStringArray(R.array.names);
			
			ImageView iv = (ImageView) row.findViewById(R.id.imageView1);
			TextView tv = (TextView) row.findViewById(R.id.textView1);
			
			tv.setText(items[position]);
			
			
			if(items[position].equals("john")){
				iv.setImageResource(R.drawable.john);
			}
                                   .
                                   .
                                   . 
                                   .

    return row;
			
		}
		
		
	}

}


And here is the no1 class

    public class no1 extends Activity {
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.name_profile);
		
		CharSequence t1 = "Name: john";
		CharSequence t2 = "Age: 31";
		CharSequence t3 = "Nationality: Saudi";
		CharSequence t4 = "Number: 765646454";
		
		ImageView iv = (ImageView) findViewById(R.drawable.john);
		TextView tv1 = (TextView) findViewById(R.id.textView1);
		TextView tv2 = (TextView) findViewById(R.id.textView2);
		TextView tv3 = (TextView) findViewById(R.id.textView3);
		TextView tv4 = (TextView) findViewById(R.id.textView4);
		
		iv.setImageResource(R.drawable.john);
		
		tv1.setText(t1);
		tv2.setText(t2);
		tv3.setText(t3);
		tv4.setText(t4);

}

}

And yes my activities are added to the manifest xml file

Thanks for your help.
Custom list starting new activity?
===

I have built a customized list item to replace the android's simple list item by inflating each list item. The customized list is working and it consists of an image view and a text view.

My problem is, when i try to launch a new activity after a list item is clicked nothing happens even the app wont crash. So, is there a way to launch an activity using list view???

    public class activityone extends ListActivity {
    
    @Override
    public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activitylayout);
		
		setListAdapter(new MyAdapter(this, android.R.layout.simple_list_item_1,      R.id.textView1, 
					       getResources().getStringArray(R.array.names)));
		
	}
    public void onListItemClick(ListView l, View v, int position,
				long id) {
			// TODO Auto-generated method stub
			super.onListItemClick(l, v, position, id);
			
			Object o = this.getListAdapter().getItem(position);
			
			if(getSelectedItemPosition() == 0){
				Intent intent = new Intent(activityone.this,no1.class);
				startActivity(intent);
			}
                                   .
                                   .
                                   . 
                                   .

    }

    private class MyAdapter extends ArrayAdapter<String>{

		public MyAdapter(Context context, int resource, int textViewResourceId,
				String[] strings) {
			super(context, textViewResourceId, strings);
			// TODO Auto-generated constructor stub
		}
		
		@Override
		public View getView(int position, View convertView, ViewGroup parent) {

			LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);
			View row = inflater.inflate(R.layout.list_item, parent, false);

			String[] items = getResources().getStringArray(R.array.names);
			
			ImageView iv = (ImageView) row.findViewById(R.id.imageView1);
			TextView tv = (TextView) row.findViewById(R.id.textView1);
			
			tv.setText(items[position]);
			
			
			if(items[position].equals("john")){
				iv.setImageResource(R.drawable.john);
			}
                                   .
                                   .
                                   . 
                                   .

    return row;
			
		}
		
		
	}

}


And here is the no1 class

    public class no1 extends Activity {
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.name_profile);
		
		CharSequence t1 = "Name: john";
		CharSequence t2 = "Age: 31";
		CharSequence t3 = "Nationality: Saudi";
		CharSequence t4 = "Number: 765646454";
		
		ImageView iv = (ImageView) findViewById(R.drawable.john);
		TextView tv1 = (TextView) findViewById(R.id.textView1);
		TextView tv2 = (TextView) findViewById(R.id.textView2);
		TextView tv3 = (TextView) findViewById(R.id.textView3);
		TextView tv4 = (TextView) findViewById(R.id.textView4);
		
		iv.setImageResource(R.drawable.john);
		
		tv1.setText(t1);
		tv2.setText(t2);
		tv3.setText(t3);
		tv4.setText(t4);

}

}

And yes my activities are added to the manifest xml file

Thanks for your help.