[Android] Made DirectoryActivity extend a ListActivity, since that's basically what its purpose is - to act as a list view.

This commit is contained in:
Lioncash 2013-10-10 02:27:58 -04:00
parent d9b909aadb
commit 5df0f7e2d1
2 changed files with 3 additions and 3 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<ListView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/list"
android:id="@android:id/list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:fastScrollEnabled="true" >

View File

@ -16,7 +16,7 @@ import android.widget.*;
import android.view.*;
public class DirectoryActivity extends Activity implements AdapterView.OnItemClickListener {
public class DirectoryActivity extends ListActivity implements AdapterView.OnItemClickListener {
private IconAdapter<FileWrapper> adapter;
private File listedDirectory;
@ -80,7 +80,7 @@ public class DirectoryActivity extends Activity implements AdapterView.OnItemCli
// Setup the list
adapter = new IconAdapter<FileWrapper>(this, R.layout.line_list_item);
ListView list = (ListView) findViewById(R.id.list);
ListView list = getListView();
list.setAdapter(adapter);
list.setOnItemClickListener(this);