private void parseUTorrentFile() { String fileName[] = torrentFile.getFilenames(); long length[] = torrentFile.getLengths(); for (int i = 0; i < fileName.length; i++) { Log.i(Constant.LOG_TAG, fileName[i] + ":" + length[i]); } }
@Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_app_list); listView = (ListView) findViewById(R.id.app_list); getExternalStorageUTorrentFile(); ArrayAdapter adapter = new ArrayAdapter<String>( this, android.R.layout.simple_list_item_1, torrentFile.getFilenames()); listView.setAdapter(adapter); parseUTorrentFile(); }