Rework manage applications to be page-able.

Turn everything around so that we can have multiple list views
with their own adapters.  Switch to using a ViewPager for managing
the different lists.  Smile!

Change-Id: I9c102abb06cf67f313a8696507aa4597b38c7ab9
This commit is contained in:
Dianne Hackborn
2012-05-16 15:50:48 -07:00
parent 1cbacf10bd
commit 309c5dcee1
9 changed files with 762 additions and 548 deletions

View File

@@ -98,6 +98,7 @@ public class InstalledAppDetails extends Fragment
private AppWidgetManager mAppWidgetManager;
private DevicePolicyManager mDpm;
private ApplicationsState mState;
private ApplicationsState.Session mSession;
private ApplicationsState.AppEntry mAppEntry;
private PackageInfo mPackageInfo;
private CanBeOnSdCardChecker mCanBeOnSdCardChecker;
@@ -348,6 +349,7 @@ public class InstalledAppDetails extends Fragment
super.onCreate(icicle);
mState = ApplicationsState.getInstance(getActivity().getApplication());
mSession = mState.newSession(this);
mPm = getActivity().getPackageManager();
IBinder b = ServiceManager.getService(Context.USB_SERVICE);
mUsbManager = IUsbManager.Stub.asInterface(b);
@@ -423,7 +425,7 @@ public class InstalledAppDetails extends Fragment
public void onResume() {
super.onResume();
mState.resume(this);
mSession.resume();
if (!refreshUi()) {
setIntentAndFinish(true, true);
}
@@ -432,7 +434,7 @@ public class InstalledAppDetails extends Fragment
@Override
public void onPause() {
super.onPause();
mState.pause();
mSession.pause();
}
@Override