am b6082fa0: Fix trackball selection on the desktop (not all apps, yet) AllApps view is always visible (in the View sense), which was causing it to take focus when it should not have. Changed Launcher to manually turn on/off the focusability of AllApps as it appears/d

Merge commit 'b6082fa019937c13e19b023cc3feb7fca14a62ab' into eclair-mr2

* commit 'b6082fa019937c13e19b023cc3feb7fca14a62ab':
  Fix trackball selection on the desktop (not all apps, yet)
This commit is contained in:
Mike Cleron
2009-10-19 17:25:07 -07:00
committed by Android Git Automerger
2 changed files with 8 additions and 0 deletions
@@ -374,6 +374,7 @@ public class AllAppsView extends RSSurfaceView
return mRollo.mMessageProc.mZoom > 0.001f;
}
/*
@Override
public boolean onTrackballEvent(MotionEvent ev)
{
@@ -386,6 +387,7 @@ public class AllAppsView extends RSSurfaceView
return true;
}
*/
public void setApps(ArrayList<ApplicationInfo> list) {
mAllAppsList = list;
+6
View File
@@ -529,6 +529,8 @@ public final class Launcher extends Activity
mAllAppsGrid.setLauncher(this);
mAllAppsGrid.setDragController(dragController);
mAllAppsGrid.setWillNotDraw(false); // We don't want a hole punched in our window.
// Manage focusability manually since this thing is always visible
mAllAppsGrid.setFocusable(false);
mWorkspace = (Workspace) dragLayer.findViewById(R.id.workspace);
final Workspace workspace = mWorkspace;
@@ -1611,6 +1613,8 @@ public final class Launcher extends Activity
mAllAppsGrid.zoom(1.0f);
//mWorkspace.hide();
mAllAppsGrid.setFocusable(true);
// TODO: fade these two too
mDeleteZone.setVisibility(View.GONE);
//mHandleView.setVisibility(View.GONE);
@@ -1619,8 +1623,10 @@ public final class Launcher extends Activity
void closeAllApps(boolean animated) {
if (mAllAppsGrid.isVisible()) {
mAllAppsGrid.zoom(0.0f);
mAllAppsGrid.setFocusable(false);
mWorkspace.getChildAt(mWorkspace.getCurrentScreen()).requestFocus();
// TODO: fade these two too
/*
mDeleteZone.setVisibility(View.VISIBLE);