这是我的代码。按下 item 时出现强制关闭错误。卡在这个程序中。没有找到合适的解决方案
myList = (ListView)findViewById(R.id.myList);
Adapter = new MobileArrayAdapter(FileShare.this, MOBILE_OS);
myList.setAdapter(Adapter);
myList.setOnItemClickListener(new OnItemClickListener()
{
public void onItemClick(AdapterView<?> parent, View view, int position, long id)
{
// Toast.makeText(getApplicationContext(), "Your message here", Toast.LENGTH_SHORT).show();
Intent i = new Intent(FileShare.this, sharedView.class);
Intent pickFileIntent = new Intent();
pickFileIntent.setAction(Intent.ACTION_GET_CONTENT);
pickFileIntent.addCategory(Intent.CATEGORY_OPENABLE);
pickFileIntent.setType("*/*");
Intent chooserIntent = Intent.createChooser(pickFileIntent, getText(R.string.choosefile_title));
startActivityForResult(chooserIntent, PICK_FILE_REQUEST);
startActivity(i);
}
});