第一个微调是好的,第二个微调是ArrayList,ArrayAdapter <>它加载文件名的文件夹,所以,即时通讯想知道如何使用if()像文件名包含或列表项中包含的,因为每个这两个文件的使用62开头或31微调onItemSelected(?????)
public void onItemSelected(AdapterView<?> arg0, View arg1, int arg2,
long arg3)
{
switch(arg0.getId())
{
case R.id.spinner:
{
if(arg2 == 0)
{
break;
}
if(arg2 == 1)
{
Intent myIntent = new Intent(Inspector.this, hord.class);
Inspector.this.startActivity(myIntent);
break;
}
if(arg2 == 2)
{
Intent myIntent = new Intent(Inspector.this, hord.class);
Inspector.this.startActivity(myIntent);
break;
}
}
case R.id.recent:
{
if(arg1.getContentDescription().toString().contains("62"))//what im trying to do
{
deviation.setText("jobwelldone");
}
}
}
// TODO Auto-generated method stub
}
你需要解释这个有点好转之前,我们可以提供帮助。添加一些上下文并提出明确的问题。 –
如果选择的项目包含“62” – JRowan