I am fairly new to Java, I have created a listview that shows some topics, now I want a user to be able to click one of the topics and take them to a new intent. Here is what I have so far. I have played around and can not make the list view click.
Code:
package com.example.app;
import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.ListView;
public class Know extends iCorps {
private String[] Topics;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.know);
Topics = getResources().getStringArray(R.array.topics);
//Arrays.sort(Countries);
ListView list = (ListView)findViewById(R.id.list);
ArrayAdapter<String> adapter = new ArrayAdapter<String>(this, R.layout.listitem, Topics);
list.setAdapter(adapter);
}
}