In my sample program in 1stscreen i have one input field,based on this input i have to show a list view(which is another activity)how can i implement that.I am new to android.Here is my code.
这是在点击后:
if(text1.getText().toString().equals("subbu"))
{
startActivity(new Intent(Listview));
// Toast.makeText(Sampleprojectsubbu1Activity.this,"Name:"+text1.getText().toString(), Toast.LENGTH_LONG).show();
}
清单如下: 就抽样而言,我提供了一些不想要的阵列。
public class Listview extends ListActivity
{
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setListAdapter(new ArrayAdapter<String>(this, R.layout.list_item, COUNTRIES));
}
static final String[] COUNTRIES = new String[]
{
"XXXXX","YYYYYY"
};
}