Fast scroll always on and with padding only on APIs >= 11
This commit is contained in:
parent
3caa411390
commit
80437abcc0
@ -131,8 +131,12 @@ public class SearchResults extends ListActivity {
|
||||
for (DB.App app : apps) {
|
||||
applist.addItem(app);
|
||||
}
|
||||
getListView().setFastScrollAlwaysVisible(true);
|
||||
getListView().setScrollBarStyle(View.SCROLLBARS_INSIDE_INSET);
|
||||
if (Utils.hasApi(11)) {
|
||||
getListView().setFastScrollAlwaysVisible(true);
|
||||
getListView().setScrollBarStyle(View.SCROLLBARS_INSIDE_INSET);
|
||||
} else {
|
||||
getListView().setFastScrollEnabled(true);
|
||||
}
|
||||
applist.notifyDataSetChanged();
|
||||
setListAdapter(applist);
|
||||
|
||||
|
@ -49,8 +49,12 @@ abstract class AppListFragment extends Fragment implements AdapterView.OnItemCli
|
||||
|
||||
protected ListView createAppListView() {
|
||||
ListView list = new ListView(getActivity());
|
||||
list.setFastScrollAlwaysVisible(true);
|
||||
list.setScrollBarStyle(View.SCROLLBARS_INSIDE_INSET);
|
||||
if (Utils.hasApi(11)) {
|
||||
list.setFastScrollAlwaysVisible(true);
|
||||
list.setScrollBarStyle(View.SCROLLBARS_INSIDE_INSET);
|
||||
} else {
|
||||
list.setFastScrollEnabled(true);
|
||||
}
|
||||
list.setOnItemClickListener(this);
|
||||
list.setAdapter(getAppListAdapter());
|
||||
return list;
|
||||
|
Loading…
x
Reference in New Issue
Block a user