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) {
|
for (DB.App app : apps) {
|
||||||
applist.addItem(app);
|
applist.addItem(app);
|
||||||
}
|
}
|
||||||
getListView().setFastScrollAlwaysVisible(true);
|
if (Utils.hasApi(11)) {
|
||||||
getListView().setScrollBarStyle(View.SCROLLBARS_INSIDE_INSET);
|
getListView().setFastScrollAlwaysVisible(true);
|
||||||
|
getListView().setScrollBarStyle(View.SCROLLBARS_INSIDE_INSET);
|
||||||
|
} else {
|
||||||
|
getListView().setFastScrollEnabled(true);
|
||||||
|
}
|
||||||
applist.notifyDataSetChanged();
|
applist.notifyDataSetChanged();
|
||||||
setListAdapter(applist);
|
setListAdapter(applist);
|
||||||
|
|
||||||
|
@ -49,8 +49,12 @@ abstract class AppListFragment extends Fragment implements AdapterView.OnItemCli
|
|||||||
|
|
||||||
protected ListView createAppListView() {
|
protected ListView createAppListView() {
|
||||||
ListView list = new ListView(getActivity());
|
ListView list = new ListView(getActivity());
|
||||||
list.setFastScrollAlwaysVisible(true);
|
if (Utils.hasApi(11)) {
|
||||||
list.setScrollBarStyle(View.SCROLLBARS_INSIDE_INSET);
|
list.setFastScrollAlwaysVisible(true);
|
||||||
|
list.setScrollBarStyle(View.SCROLLBARS_INSIDE_INSET);
|
||||||
|
} else {
|
||||||
|
list.setFastScrollEnabled(true);
|
||||||
|
}
|
||||||
list.setOnItemClickListener(this);
|
list.setOnItemClickListener(this);
|
||||||
list.setAdapter(getAppListAdapter());
|
list.setAdapter(getAppListAdapter());
|
||||||
return list;
|
return list;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user