mirror of
https://github.com/libretro/RetroArch
synced 2025-01-29 18:32:44 +00:00
[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:
parent
d9b909aadb
commit
5df0f7e2d1
@ -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" >
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user