Adding holographic outline for paged items (sans widgets).

Fixing possible null ptr exception in Launcher.

Change-Id: Ie625a6503299cf122e5c22852846d59e66f77414
This commit is contained in:
Winson Chung
2010-08-19 14:51:28 -07:00
parent 5a74c07c1c
commit b3347bb9f4
12 changed files with 275 additions and 216 deletions
@@ -44,8 +44,7 @@ import com.android.launcher.R;
* with all of the user's applications.
*/
public class AllAppsPagedView extends PagedView
implements AllAppsView, View.OnClickListener, View.OnLongClickListener, DragSource,
PagedViewCellLayout.DimmedBitmapSetupListener {
implements AllAppsView, View.OnClickListener, View.OnLongClickListener, DragSource {
private static final String TAG = "AllAppsPagedView";
private static final boolean DEBUG = false;
@@ -303,7 +302,6 @@ public class AllAppsPagedView extends PagedView
for (int i = curNumPages; i < numPages; ++i) {
PagedViewCellLayout layout = new PagedViewCellLayout(getContext());
layout.setCellCount(mCellCountX, mCellCountY);
layout.setDimmedBitmapSetupListener(this);
addView(layout);
}
@@ -343,7 +341,7 @@ public class AllAppsPagedView extends PagedView
ApplicationInfo info = mFilteredApps.get(i);
TextView text = (TextView) layout.getChildAt(index);
text.setCompoundDrawablesWithIntrinsicBounds(null,
new BitmapDrawable(info.iconBitmap), null, null);
new FastBitmapDrawable(info.iconBitmap), null, null);
text.setText(info.title);
text.setTag(info);
@@ -353,24 +351,4 @@ public class AllAppsPagedView extends PagedView
params.cellY = index / mCellCountX;
}
}
@Override
public void onPreUpdateDimmedBitmap(PagedViewCellLayout layout) {
// disable all children text for now
final int childCount = layout.getChildCount();
for (int i = 0; i < childCount; ++i) {
TextView text = (TextView) layout.getChildAt(i);
text.setText("");
}
}
@Override
public void onPostUpdateDimmedBitmap(PagedViewCellLayout layout) {
// re-enable all children text
final int childCount = layout.getChildCount();
for (int i = 0; i < childCount; ++i) {
TextView text = (TextView) layout.getChildAt(i);
final ApplicationInfo info = (ApplicationInfo) text.getTag();
text.setText(info.title);
}
}
}