Fix Notification Access layout for tabletUI support

- setup correct padding for the App list and its item

also remove showing FastScroller all the time on App Notification list

See bug: #13140648 Settings needs to support the new Quantum Paper theme

Change-Id: I11a70906f1372027622d50a81bc7744d48190f8a
This commit is contained in:
Fabrice Di Meglio
2014-07-21 13:41:32 -07:00
parent 7bc9c1bce3
commit 20b32f25f0
4 changed files with 17 additions and 10 deletions

View File

@@ -60,7 +60,7 @@ public abstract class ManagedServiceSettings extends ListFragment {
private ContentResolver mCR;
private final HashSet<ComponentName> mEnabledServices = new HashSet<ComponentName>();
private ServiceListAdapter mList;
private ServiceListAdapter mListAdapter;
abstract protected Config getConfig();
@@ -130,7 +130,7 @@ public abstract class ManagedServiceSettings extends ListFragment {
mPM = getActivity().getPackageManager();
mCR = getActivity().getContentResolver();
mList = new ServiceListAdapter(getActivity());
mListAdapter = new ServiceListAdapter(getActivity());
}
@Override
@@ -200,10 +200,10 @@ public abstract class ManagedServiceSettings extends ListFragment {
private void updateList() {
loadEnabledServices();
getServices(mConfig, mList, mPM);
mList.sort(new PackageItemInfo.DisplayNameComparator(mPM));
getServices(mConfig, mListAdapter, mPM);
mListAdapter.sort(new PackageItemInfo.DisplayNameComparator(mPM));
getListView().setAdapter(mList);
getListView().setAdapter(mListAdapter);
}
protected static int getEnabledServicesCount(Config config, Context context) {
@@ -255,7 +255,7 @@ public abstract class ManagedServiceSettings extends ListFragment {
@Override
public void onListItemClick(ListView l, View v, int position, long id) {
ServiceInfo info = mList.getItem(position);
ServiceInfo info = mListAdapter.getItem(position);
final ComponentName cn = new ComponentName(info.packageName, info.name);
if (mEnabledServices.contains(cn)) {
// the simple version: disabling