(Android) implement fast scroll in XML layout, not code

This commit is contained in:
ToadKing 2013-01-30 11:58:32 -05:00
parent 834b457294
commit 0fb902cc47
2 changed files with 3 additions and 2 deletions

View File

@ -2,6 +2,8 @@
<ListView xmlns:android="http://schemas.android.com/apk/res/android" <ListView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/list" android:id="@+id/list"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" > android:layout_height="wrap_content"
android:fastScrollEnabled="true" >
</ListView> </ListView>

View File

@ -150,7 +150,6 @@ public class DirectoryActivity extends Activity implements
ListView list = (ListView) findViewById(R.id.list); ListView list = (ListView) findViewById(R.id.list);
list.setAdapter(adapter); list.setAdapter(adapter);
list.setOnItemClickListener(this); list.setOnItemClickListener(this);
list.setFastScrollEnabled(true);
// Load Directory // Load Directory
if (savedInstanceState != null) { if (savedInstanceState != null) {